patch-2.4.20 linux-2.4.20/kernel/exit.c

Next file: linux-2.4.20/kernel/fork.c
Previous file: linux-2.4.20/ipc/util.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.19/kernel/exit.c linux-2.4.20/kernel/exit.c
@@ -158,21 +158,10 @@
  */
 static inline void forget_original_parent(struct task_struct * father)
 {
-	struct task_struct * p, *reaper;
+	struct task_struct * p;
 
 	read_lock(&tasklist_lock);
 
-	/* Next in our thread group, if they're not already exiting */
-	reaper = father;
-	do {
-		reaper = next_thread(reaper);
-		if (!(reaper->flags & PF_EXITING))
-			break;
-	} while (reaper != father);
-
-	if (reaper == father)
-		reaper = child_reaper;
-
 	for_each_task(p) {
 		if (p->p_opptr == father) {
 			/* We dont want people slaying init */
@@ -180,10 +169,7 @@
 			p->self_exec_id++;
 
 			/* Make sure we're not reparenting to ourselves */
-			if (p == reaper)
-				p->p_opptr = child_reaper;
-			else
-				p->p_opptr = reaper;
+			p->p_opptr = child_reaper;
 
 			if (p->pdeath_signal) send_sig(p->pdeath_signal, p, 0);
 		}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)