svn commit: r288967 - in stable: 10/sys/kern 9/sys/kern

John Baldwin jhb at FreeBSD.org
Wed Oct 7 00:33:46 UTC 2015


Author: jhb
Date: Wed Oct  7 00:33:44 2015
New Revision: 288967
URL: https://svnweb.freebsd.org/changeset/base/288967

Log:
  MFC 287864:
  When a process group leader exits, all of the processes in the group are
  sent SIGHUP and SIGCONT if any of the processes are stopped.  Currently this
  behavior is triggered for any type of process stop including ptrace() stops
  and transient stops for single threading during exit() and execve().
  Thus, if a debugger is attached to a process in a group when the leader
  exits, the entire group can be HUPed.  Instead, only send the signals if a
  process in the group is stopped due to SIGSTOP.

Modified:
  stable/9/sys/kern/kern_proc.c
Directory Properties:
  stable/9/sys/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/sys/kern/kern_proc.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/9/sys/kern/kern_proc.c
==============================================================================
--- stable/9/sys/kern/kern_proc.c	Wed Oct  7 00:32:33 2015	(r288966)
+++ stable/9/sys/kern/kern_proc.c	Wed Oct  7 00:33:44 2015	(r288967)
@@ -691,7 +691,7 @@ orphanpg(pg)
 
 	LIST_FOREACH(p, &pg->pg_members, p_pglist) {
 		PROC_LOCK(p);
-		if (P_SHOULDSTOP(p)) {
+		if (P_SHOULDSTOP(p) == P_STOPPED_SIG) {
 			PROC_UNLOCK(p);
 			LIST_FOREACH(p, &pg->pg_members, p_pglist) {
 				PROC_LOCK(p);


More information about the svn-src-all mailing list