Date: Mon, 14 Oct 2002 17:14:32 -0700 (PDT) From: John Baldwin <jhb@FreeBSD.org> To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern kern_exit.c kern_fork.c kern_proc.c src/sys/sys proc.h Message-ID: <200210150014.g9F0EWcx000882@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
jhb 2002/10/14 17:14:32 PDT Modified files: sys/kern kern_exit.c kern_fork.c kern_proc.c sys/sys proc.h Log: - Add a new global mutex 'ppeers_lock' to protect the p_peers list of processes forked with RFTHREAD. - Use a goto to a label for common code when exiting from fork1() in case of an error. - Move the RFTHREAD linkage setup code later in fork since the ppeers_lock cannot be locked while holding a proc lock. Handle the race of a task leader exiting and killing its peers while a peer is forking a new child. In that case, go ahead and let the peer process proceed normally as the parent is about to kill it. However, the task leader may have already gone to sleep to wait for the peers to die, so the new child process may not receive a SIGKILL from the task leader. Rather than try to destruct the new child process, just go ahead and send it a SIGKILL directly and add it to the p_peers list. This ensures that the task leader will wait until both the peer process doing the fork() and the new child process have received their KILL signals and exited. Discussed with: truckman (earlier versions) Revision Changes Path 1.184 +6 -6 src/sys/kern/kern_exit.c 1.171 +50 -38 src/sys/kern/kern_fork.c 1.162 +2 -0 src/sys/kern/kern_proc.c 1.271 +3 -1 src/sys/sys/proc.h To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210150014.g9F0EWcx000882>