[Bug 203162] when close(fd) on a fifo fails with EINTR, the file descriptor is not really closed

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Sep 17 15:34:38 UTC 2015


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203162

Konstantin Belousov <kib at FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #161136|0                           |1
        is obsolete|                            |

--- Comment #7 from Konstantin Belousov <kib at FreeBSD.org> ---
Created attachment 161150
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=161150&action=edit
Ignore signal after a wakeup, if there was a complimentary open, even transient

The new version of the patch is even more aggressive with preferring a normal
return when there is both signal delivered and parallel open.  Now, I run
several thousand iterations of your test without hang, while before it would
reliably hang on first or second dozens.

Some clarification about signals.  Patch does not cause the signal to be lost. 
Before the patch, you get EINTR error when signal was generated _and_ parallel
complimentary type of open happen. Now, the syscall returns with success and
file descriptor, but before the usermode continues, a signal frame is pushed on
stack and signal handler run.  In other words, things are changed so that it
_looks_ like the signal was delivered slightly after the wakeup from open.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list