HomeFreeBSD

issignal(): ignore signals when process is single-threading for exit

Description

issignal(): ignore signals when process is single-threading for exit

Places that will wait for curproc->p_singlethr to become zero (in the
next commit, the counter of number of external single-threading is
to be introduced), must wait for it interruptible, otherwise we
deadlock. On the other hand, a signal delivered during this window,
if directed to the waiting thread, would cause the wait loop to become
a busy loop.

Since we are exiting, it is safe to ignore the signals.

Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D35310

Details

Provenance
kibAuthored on May 26 2022, 7:18 PM
Reviewer
markj
Differential Revision
D35310: Set of fixes for REAP_KILL_SUBTREE
Parents
rGd3000939c7b9: P2_WEXIT: avoid thread_single() for exiting process earlier
Branches
Unknown
Tags
Unknown