[Bug 219228] EINTR on thread with full signal mask.

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri May 12 01:04:35 UTC 2017


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

--- Comment #1 from Duane <parakleta at darkreality.org> ---
I rummaged a bit more in the code, and I might be on the wrong track, but it
looks like `reschedule_signals()` is called whenever the mask is changed (such
as when a handler is launched) and if the signal is still pending and in the
`block` set then `sigtd()` is picks an arbitrary thread if they are all
blocked, and then since the process wants to catch the signal (i.e.
`SIGISMEMBER(ps->ps_sigcatch, sig)` this calls `tdsigwakeup()` to force a
wakeup of the thread even if it is blocked from receiving the signal.

I think either `sigtd()` should default to the main thread rather than the most
recent, or else the `SIGISMEMBER` test should also check
`!SIGISMEMBER(td->td_sigmask, sig)` before calling `tdsigwakeup()`.  Or maybe
both of these changes.

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


More information about the freebsd-bugs mailing list