]> git.ipfire.org Git - people/arne_f/kernel.git/commitdiff
[PATCH] Don't auto-reap traced children
authorOleg Nesterov <oleg@tv-sign.ru>
Thu, 10 Nov 2005 14:22:18 +0000 (17:22 +0300)
committerChris Wright <chrisw@osdl.org>
Thu, 24 Nov 2005 22:10:07 +0000 (14:10 -0800)
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.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Chris Wright <chrisw@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kernel/signal.c

index 6904bbbfe116985d1710f04fcfd5792a536d382f..0d755c68981e44444f4b6e0fb585b5a24c54f161 100644 (file)
@@ -1524,7 +1524,7 @@ void do_notify_parent(struct task_struct *tsk, int sig)
 
        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))) {
                /*