aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/exit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index 576eae233b53..405e6877168b 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -818,6 +818,8 @@ static void reparent_thread(struct task_struct *p, struct task_struct *father)
818 818
819 list_move_tail(&p->sibling, &p->real_parent->children); 819 list_move_tail(&p->sibling, &p->real_parent->children);
820 820
821 if (task_detached(p))
822 return;
821 /* If this is a threaded reparent there is no need to 823 /* If this is a threaded reparent there is no need to
822 * notify anyone anything has happened. 824 * notify anyone anything has happened.
823 */ 825 */
@@ -825,15 +827,13 @@ static void reparent_thread(struct task_struct *p, struct task_struct *father)
825 return; 827 return;
826 828
827 /* We don't want people slaying init. */ 829 /* We don't want people slaying init. */
828 if (!task_detached(p)) 830 p->exit_signal = SIGCHLD;
829 p->exit_signal = SIGCHLD;
830 831
831 /* If we'd notified the old parent about this child's death, 832 /* If we'd notified the old parent about this child's death,
832 * also notify the new parent. 833 * also notify the new parent.
833 */ 834 */
834 if (!ptrace_reparented(p) && 835 if (!ptrace_reparented(p) &&
835 p->exit_state == EXIT_ZOMBIE && 836 p->exit_state == EXIT_ZOMBIE && thread_group_empty(p))
836 !task_detached(p) && thread_group_empty(p))
837 do_notify_parent(p, p->exit_signal); 837 do_notify_parent(p, p->exit_signal);
838 838
839 kill_orphaned_pgrp(p, father); 839 kill_orphaned_pgrp(p, father);