From 9ba69ebd9c998223562f3b70a905de7378ab6b3c Mon Sep 17 00:00:00 2001 From: Oleg Nesterov Date: Sun, 24 Dec 2006 23:30:44 +0300 Subject: [PATCH] --- yaml --- r: 45161 b: refs/heads/master c: 241ceee0b442c69226fb882d61d9b9785743898f h: refs/heads/master i: 45159: 2b155874838fbcecbd7ead117d59aa52d9886e41 v: v3 --- [refs] | 2 +- trunk/kernel/exit.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index fb1afeb387aa..532dcfa8be45 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9d572ecbd81b9ff6e6a9bc0d2598212a59eb738a +refs/heads/master: 241ceee0b442c69226fb882d61d9b9785743898f diff --git a/trunk/kernel/exit.c b/trunk/kernel/exit.c index 46cf6b681460..35401720635b 100644 --- a/trunk/kernel/exit.c +++ b/trunk/kernel/exit.c @@ -597,6 +597,10 @@ choose_new_parent(struct task_struct *p, struct task_struct *reaper) static void 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. */ if (unlikely(traced)) { /* 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) /* We don't want people slaying init. */ if (p->exit_signal != -1) 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, * also notify the new parent.