[RFC][BZ #14627] Make linux close errno to EINPROGRESS when interrupted in signal.
Paul Eggert
eggert@cs.ucla.edu
Sat Dec 7 03:09:00 GMT 2013
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.
More information about the Libc-alpha
mailing list