[RFC][BZ #14627] Make linux close errno to EINPROGRESS when interrupted in signal.
Rich Felker
dalias@aerifal.cx
Fri Dec 6 03:50:00 GMT 2013
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
More information about the Libc-alpha
mailing list