patch-2.0.34 linux/kernel/exit.c
Next file: linux/kernel/fork.c
Previous file: linux/ipc/shm.c
Back to the patch index
Back to the overall index
-  Lines: 18
-  Date:
Wed Jun  3 15:17:50 1998
-  Orig file: 
v2.0.33/linux/kernel/exit.c
-  Orig date: 
Tue Mar 10 13:19:09 1998
diff -u --recursive --new-file v2.0.33/linux/kernel/exit.c linux/kernel/exit.c
@@ -660,9 +660,14 @@
 			if (p->pgrp != -pid)
 				continue;
 		}
-		/* wait for cloned processes iff the __WCLONE flag is set */
-		if ((p->exit_signal != SIGCHLD) ^ ((options & __WCLONE) != 0))
-			continue;
+		/* If you are tracing a process, then you don't need to get the
+		 * WCLONE bit right -- useful for strace and gdb
+		 */
+		if (!(p->flags & (PF_PTRACED|PF_TRACESYS))) {
+			/* wait for cloned processes iff the __WCLONE flag is set */
+			if ((p->exit_signal != SIGCHLD) ^ ((options & __WCLONE) != 0))
+				continue;
+		}
 		flag = 1;
 		switch (p->state) {
 			case TASK_STOPPED:
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov