kernel - Fix signal races against exiting processes
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 14 Dec 2011 03:37:04 +0000 (19:37 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 14 Dec 2011 03:37:04 +0000 (19:37 -0800)
commite6426055a7e9e7c1758b2502d30bd71859aa4c62
treec8a8baf2b21cffcf1b3657f9fccf79c7b6cea7f7
parent46e5a8baaa6bf87d727b3a004c0235be87813f7a
kernel - Fix signal races against exiting processes

* Fix a panic which can occur when a signal races an exiting process.

* Fix an incorrect status return from the wait*() system calls which
  can sometimes occur when a SIGTSTP or other signal races an exit.

  Do not allow the signal status to overwrite the exit value.

* Fix a race where the kill() system call can return ESRCH when a signal
  races an exiting process which has already entered the zombie state.

  Return success in this case and silently drop the signal.
sys/kern/kern_sig.c