This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC][BZ #14627] Make linux close errno to EINPROGRESS when interrupted in signal.
- From: Rich Felker <dalias at aerifal dot cx>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: David Miller <davem at davemloft dot net>, eagle at eyrie dot org, libc-alpha at sourceware dot org
- Date: Thu, 5 Dec 2013 21:09:29 -0500
- Subject: Re: [RFC][BZ #14627] Make linux close errno to EINPROGRESS when interrupted in signal.
- Authentication-results: sourceware.org; auth=none
- References: <20131205 dot 155009 dot 707968344039994800 dot davem at davemloft dot net> <87ob4vggn3 dot fsf at windlord dot stanford dot edu> <20131205223223 dot GQ24286 at brightrain dot aerifal dot cx> <20131205 dot 193739 dot 882517176297322058 dot davem at davemloft dot net> <20131206005337 dot GU24286 at brightrain dot aerifal dot cx> <Pine dot LNX dot 4 dot 64 dot 1312060148170 dot 16480 at digraph dot polyomino dot org dot uk>
On Fri, Dec 06, 2013 at 01:52:15AM +0000, Joseph S. Myers wrote:
> On Thu, 5 Dec 2013, Rich Felker wrote:
>
> > Most GNU programs using gnulib check for an error closing stdout
> > before they exit and adjust their exit status accordingly. I doubt
> > anything else checks.
>
> That should be about fclose errors (i.e. if a write syscall failed, with
> stdout redirected) rather than errors from the close syscall (although of
> course if the close syscall failed that would be passed though to fclose).
Well gnulib is specifically checking the return value of fclose rather
than just calling fflush and checking its return value. I take that as
an indication that they actually want to check the close too. Also, if
I'm not mistaken they check stdin too in some cases, where the error
could not be from write failures.
Rich