Subject: CVS commit: syssrc
To: None <>
From: Jason R Thorpe <>
List: source-changes
Date: 07/22/1999 11:13:38
Module Name:	syssrc
Committed By:	thorpej
Date:		Thu Jul 22 18:13:38 UTC 1999

Modified Files:
	syssrc/sys/kern: kern_exit.c kern_proc.c kern_sig.c kern_synch.c
	    kern_sysctl.c tty.c
	syssrc/sys/miscfs/procfs: procfs_cmdline.c procfs_ctl.c
	syssrc/sys/sys: proc.h

Log Message:
Rework the process exit path, in preparation for making process exit
and PID allocation MP-safe.  A new process state is added: SDEAD.  This
state indicates that a process is dead, but not yet a zombie (has not
yet been processed by the process reaper).

SDEAD processes exist on both the zombproc list (via p_list) and deadproc
(via p_hash; the proc has been removed from the pidhash earlier in the exit
path).  When the reaper deals with a process, it changes the state to
SZOMB, so that wait4 can process it.

Add a P_ZOMBIE() macro, which treats a proc in SZOMB or SDEAD as a zombie,
and update various parts of the kernel to reflect the new state.

To generate a diff of this commit:
cvs rdiff -r1.71 -r1.72 syssrc/sys/kern/kern_exit.c
cvs rdiff -r1.31 -r1.32 syssrc/sys/kern/kern_proc.c
cvs rdiff -r1.89 -r1.90 syssrc/sys/kern/kern_sig.c
cvs rdiff -r1.59 -r1.60 syssrc/sys/kern/kern_synch.c
cvs rdiff -r1.47 -r1.48 syssrc/sys/kern/kern_sysctl.c
cvs rdiff -r1.113 -r1.114 syssrc/sys/kern/tty.c
cvs rdiff -r1.5 -r1.6 syssrc/sys/miscfs/procfs/procfs_cmdline.c
cvs rdiff -r1.16 -r1.17 syssrc/sys/miscfs/procfs/procfs_ctl.c
cvs rdiff -r1.78 -r1.79 syssrc/sys/sys/proc.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.