sigsuspend(2): sleep on &nowake channel
authorcheloha <cheloha@openbsd.org>
Fri, 12 Nov 2021 17:57:13 +0000 (17:57 +0000)
committercheloha <cheloha@openbsd.org>
Fri, 12 Nov 2021 17:57:13 +0000 (17:57 +0000)
commitf731d8c3424892e69a23d907be2f304411a19b5e
tree58c292d9256e938b9452789e42a6d765eed6891a
parent269321ae1e2efe4e3a3ea0b1334b2cd5fac28320
sigsuspend(2): sleep on &nowake channel

sigsuspend(2) only returns upon delivery of a signal: we do not expect
a wakeup(9).  Indicate this by sleeping on &nowake instead of
&p->p_p->ps_sigacts.  We still need to loop here to handle spurious
wakeups, though.

Spurious wakeup case pointed out by kettenis@.

ok claudio@
sys/kern/kern_sig.c