Skip to contentSkip to conversation

Dont auto-reap traced children

PATCH In review Chris Wright 1 participant 1 message Nov 22, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 2/23 Dont auto-reap traced children

-stable review patch. If anyone has any objections, please let us know.
------------------

If a task is being traced we never auto-reap it even if it might look like its parent doesn't care. The tracer obviously _does_ care.

---
 kernel/signal.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/signal.c +1 -1
@@ -1524,7 +1524,7 @@ void do_notify_parent(struct task_struct
 
 	psig = tsk->parent->sighand;
 	spin_lock_irqsave(&psig->siglock, flags);
-	if (sig == SIGCHLD &&
+	if (!tsk->ptrace && sig == SIGCHLD &&
 	    (psig->action[SIGCHLD-1].sa.sa_handler == SIG_IGN ||
 	     (psig->action[SIGCHLD-1].sa.sa_flags & SA_NOCLDWAIT))) {
 		/*

--