This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 2/4] nptl: Handle EPIPE on tst-cancel2
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: Rich Felker <dalias at libc dot org>, Florian Weimer <fweimer at redhat dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 3 Sep 2019 09:15:58 -0300
- Subject: Re: [PATCH 2/4] nptl: Handle EPIPE on tst-cancel2
- References: <20190815211843.22799-2-adhemerval.zanella@linaro.org> <87k1b8p23k.fsf@oldenburg2.str.redhat.com> <508b3320-35a9-60f8-d507-5213e71f706d@linaro.org> <877e78nga9.fsf@oldenburg2.str.redhat.com> <363f8fb4-2628-827e-c309-4a58d1f18fba@linaro.org> <87imqrn9bv.fsf@oldenburg2.str.redhat.com> <d1f95ec8-5ec6-059a-f8e6-5822c0f2c9f8@linaro.org> <8736hsujys.fsf@oldenburg2.str.redhat.com> <20190830135103.GJ9017@brightrain.aerifal.cx> <87d0gix4aq.fsf@oldenburg2.str.redhat.com> <20190902232623.GU9017@brightrain.aerifal.cx>
On 02/09/2019 20:26, Rich Felker wrote:
> If the descriptor has been closed, you *can't* act on cancellation. On
> Linux, SYS_close *never* returns to userspace without the fd having
> been closed. It can return EINTR, indicating that the fd has been
> closed but the underlying open file description (if this was the last
> reference to it) has not, but this EINTR is not POSIX conforming with
> the new changes to POSIX, and it was always inconsistent with the
> semantics implied by EINTR ("no nontrivial side effects have happened
> yet"). See https://sourceware.org/bugzilla/show_bug.cgi?id=14627
So is it true even for newer version? I had the impression from the lwn
article [1] that this is driver dependent and this behaviour will eventually
be removed from kernel to not allow close to return EINTR.
About BZ#14627, does it still make sense for *Linux* to map EINTR to
EINPROGRESS?
[1] https://lwn.net/Articles/576478/