Move the P_WEXIT check from lwpsignal() to kern_kill(). That is, disallow
commit37a3a2ef34224f640ef563f20bd601f0e770f5d4
authorMatthew Dillon <dillon@dragonflybsd.org>
Sat, 30 Jun 2007 02:33:04 +0000 (30 02:33 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Sat, 30 Jun 2007 02:33:04 +0000 (30 02:33 +0000)
tree840771e9053dd2333e3f1aadc09fe553b72df9c7
parent59e05db3a2da303d368a1f0f2dddc28b6e5724a3
Move the P_WEXIT check from lwpsignal() to kern_kill().  That is, disallow
signals to exiting processes but allow signals to threads that have not gone
through the exit interlock yet.  This allows exit1() to interlock the process
and still signal its LWPs.

Fix a bug in exit1() which was improperly using lwp_signotify() to wake up
LWPs to force the to exit.  This function is basically a NOP if there are
no signals pending to the LWP.  Send a real SIGKILL to the LWP instead.

This fixes a bug where vkernels get stuck in an exiting state and cannot be
killed.

Reported-by: Joe Talbott <josepht@cstone.net>
sys/kern/kern_exit.c
sys/kern/kern_sig.c