提交 7ed0175a 编写于 作者: O Oleg Nesterov 提交者: Linus Torvalds

[PATCH] Don't auto-reap traced children

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: NLinus Torvalds <torvalds@osdl.org>
上级 759979ab
...@@ -1499,7 +1499,7 @@ void do_notify_parent(struct task_struct *tsk, int sig) ...@@ -1499,7 +1499,7 @@ void do_notify_parent(struct task_struct *tsk, int sig)
psig = tsk->parent->sighand; psig = tsk->parent->sighand;
spin_lock_irqsave(&psig->siglock, flags); 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_handler == SIG_IGN ||
(psig->action[SIGCHLD-1].sa.sa_flags & SA_NOCLDWAIT))) { (psig->action[SIGCHLD-1].sa.sa_flags & SA_NOCLDWAIT))) {
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册