cvs commit: src/sys/kern kern_exit.c

John Baldwin jhb at FreeBSD.org
Mon May 14 22:21:59 UTC 2007


jhb         2007-05-14 22:21:58 UTC

  FreeBSD src repository

  Modified files:
    sys/kern             kern_exit.c 
  Log:
  Move cpu_exit() earlier in exit1() to close a race between
  SIGCHLD/kevent(2) notification of process termination and wait().  Now
  we no longer drop locks between sending the notification and marking
  the process as a zombie.  Previously, if another process attempted to do
  a wait() with W_NOHANG after receiving a SIGCHLD or kevent and locked
  the process while the exiting thread was in cpu_exit(), then wait() would
  fail to find the process, which is quite astonishing to the process
  calling wait().
  
  MFC after:      3 days
  
  Revision  Changes    Path
  1.298     +10 -16    src/sys/kern/kern_exit.c


More information about the cvs-src mailing list