aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@tv-sign.ru>2006-12-24 15:30:44 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-31 17:41:18 -0500
commit241ceee0b442c69226fb882d61d9b9785743898f (patch)
tree398eb111e2addcc7e5cc1f1c30006b9ec92b7a0e
parent9d572ecbd81b9ff6e6a9bc0d2598212a59eb738a (diff)
[PATCH] restore ->pdeath_signal behaviour
Commit b2b2cbc4b2a2f389442549399a993a8306420baf 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: Oleg 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: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--kernel/exit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index 46cf6b681460..35401720635b 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -597,6 +597,10 @@ choose_new_parent(struct task_struct *p, struct task_struct *reaper)
597static void 597static void
598reparent_thread(struct task_struct *p, struct task_struct *father, int traced) 598reparent_thread(struct task_struct *p, struct task_struct *father, int traced)
599{ 599{
600 if (p->pdeath_signal)
601 /* We already hold the tasklist_lock here. */
602 group_send_sig_info(p->pdeath_signal, SEND_SIG_NOINFO, p);
603
600 /* Move the child from its dying parent to the new one. */ 604 /* Move the child from its dying parent to the new one. */
601 if (unlikely(traced)) { 605 if (unlikely(traced)) {
602 /* Preserve ptrace links if someone else is tracing this child. */ 606 /* Preserve ptrace links if someone else is tracing this child. */
@@ -631,10 +635,6 @@ reparent_thread(struct task_struct *p, struct task_struct *father, int traced)
631 /* We don't want people slaying init. */ 635 /* We don't want people slaying init. */
632 if (p->exit_signal != -1) 636 if (p->exit_signal != -1)
633 p->exit_signal = SIGCHLD; 637 p->exit_signal = SIGCHLD;
634
635 if (p->pdeath_signal)
636 /* We already hold the tasklist_lock here. */
637 group_send_sig_info(p->pdeath_signal, SEND_SIG_NOINFO, p);
638 638
639 /* If we'd notified the old parent about this child's death, 639 /* If we'd notified the old parent about this child's death,
640 * also notify the new parent. 640 * also notify the new parent.