Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 May 2017 01:04:35 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 219228] EINTR on thread with full signal mask.
Message-ID:  <bug-219228-8-3N5jvkDwrD@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-219228-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-219228-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D219228

--- Comment #1 from Duane <parakleta@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 (s=
uch
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 may=
be
both of these changes.

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-219228-8-3N5jvkDwrD>