Commit 241ceee0 authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Linus Torvalds

[PATCH] restore ->pdeath_signal behaviour

Commit b2b2cbc4 introduced a user-
visible change: ->pdeath_signal is sent only when the entire thread
group exits.

While this change is imho good, it may break things.  So restore the
old behaviour for now.
Signed-off-by: default avatarOleg Nesterov <oleg@tv-sign.ru>
To: Albert Cahalan <acahalan@gmail.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Andrew Morton <akpm@osdl.org>
Cc: Linus Torvalds <torvalds@osdl.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Qi Yong <qiyong@fc-cn.com>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 9d572ecb
...@@ -597,6 +597,10 @@ choose_new_parent(struct task_struct *p, struct task_struct *reaper) ...@@ -597,6 +597,10 @@ choose_new_parent(struct task_struct *p, struct task_struct *reaper)
static void static void
reparent_thread(struct task_struct *p, struct task_struct *father, int traced) reparent_thread(struct task_struct *p, struct task_struct *father, int traced)
{ {
if (p->pdeath_signal)
/* We already hold the tasklist_lock here. */
group_send_sig_info(p->pdeath_signal, SEND_SIG_NOINFO, p);
/* Move the child from its dying parent to the new one. */ /* Move the child from its dying parent to the new one. */
if (unlikely(traced)) { if (unlikely(traced)) {
/* Preserve ptrace links if someone else is tracing this child. */ /* Preserve ptrace links if someone else is tracing this child. */
...@@ -632,10 +636,6 @@ reparent_thread(struct task_struct *p, struct task_struct *father, int traced) ...@@ -632,10 +636,6 @@ reparent_thread(struct task_struct *p, struct task_struct *father, int traced)
if (p->exit_signal != -1) if (p->exit_signal != -1)
p->exit_signal = SIGCHLD; p->exit_signal = SIGCHLD;
if (p->pdeath_signal)
/* We already hold the tasklist_lock here. */
group_send_sig_info(p->pdeath_signal, SEND_SIG_NOINFO, p);
/* If we'd notified the old parent about this child's death, /* If we'd notified the old parent about this child's death,
* also notify the new parent. * also notify the new parent.
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment