Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
1
Description
On Linux, retrying close on EINTR is dangerous because the fd is already released and we may accidentally close a newly opened fd (from another thread), see:
http://ewontfix.com/4/
http://lwn.net/Articles/576478/
http://lwn.net/Articles/576591/
It appears that other OSes, like HPUX, require a retry of close on EINTR. The Austin Group recently proposed changes to POSIX to require that the EINTR case need a retry, but EINPROGRESS be used for when a retry should not occur:
http://austingroupbugs.net/view.php?id=529
However, Linux does not follow this and so we need to remove our EINTR retries.
Some more links for posterity:
https://github.com/wahern/cqueues/issues/56#issuecomment-108656004
https://code.google.com/p/chromium/issues/detail?id=269623
https://codereview.chromium.org/23455051/