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: Paul Eggert <eggert at cs dot ucla dot edu>
- To: David Miller <davem at davemloft dot net>
- Cc: libc-alpha at sourceware dot org
- Date: Fri, 06 Dec 2013 17:53:47 -0800
- Subject: Re: [RFC][BZ #14627] Make linux close errno to EINPROGRESS when interrupted in signal.
- Authentication-results: sourceware.org; auth=none
- References: <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> <20131205 dot 202925 dot 591041700017624526 dot davem at davemloft dot net>
David Miller wrote:
> Emacs checked back ~13 years ago, and any error made it abort and dump
> core.
Although Emacs no longer does that, the latest stable
version of Emacs is still buggy in this area,
because it assumes the old (non-multithreaded) semantics
for 'close', even though Emacs typically runs multithreaded
nowadays. Races are rare, but presumably they can happen.
To fix this, the next version of Emacs is planned to use the
future-POSIX posix_close and POSIX_CLOSE_RESTART API. Emacs
will attempt to emulate the future-POSIX API on current and
older systems that lack it; this emulation won't be perfect.
It'd be helpful if glibc supported the future-POSIX API.
I didn't see any suggestion to that effect in the bug database
so I just now filed an enhancement request for that, as BZ#16302.