aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/exit.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/exit.c')
-rw-r--r--kernel/exit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index 213f906f5e16..938cceebb9ad 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -757,7 +757,7 @@ static void reparent_thread(struct task_struct *father, struct task_struct *p,
757 p->exit_signal = SIGCHLD; 757 p->exit_signal = SIGCHLD;
758 758
759 /* If it has exited notify the new parent about this child's death. */ 759 /* If it has exited notify the new parent about this child's death. */
760 if (!p->ptrace && 760 if (!task_ptrace(p) &&
761 p->exit_state == EXIT_ZOMBIE && thread_group_empty(p)) { 761 p->exit_state == EXIT_ZOMBIE && thread_group_empty(p)) {
762 do_notify_parent(p, p->exit_signal); 762 do_notify_parent(p, p->exit_signal);
763 if (task_detached(p)) { 763 if (task_detached(p)) {
@@ -782,7 +782,7 @@ static void forget_original_parent(struct task_struct *father)
782 list_for_each_entry_safe(p, n, &father->children, sibling) { 782 list_for_each_entry_safe(p, n, &father->children, sibling) {
783 p->real_parent = reaper; 783 p->real_parent = reaper;
784 if (p->parent == father) { 784 if (p->parent == father) {
785 BUG_ON(p->ptrace); 785 BUG_ON(task_ptrace(p));
786 p->parent = p->real_parent; 786 p->parent = p->real_parent;
787 } 787 }
788 reparent_thread(father, p, &dead_children); 788 reparent_thread(father, p, &dead_children);
@@ -1482,7 +1482,7 @@ static int wait_consider_task(struct task_struct *parent, int ptrace,
1482 return 0; 1482 return 0;
1483 } 1483 }
1484 1484
1485 if (likely(!ptrace) && unlikely(p->ptrace)) { 1485 if (likely(!ptrace) && unlikely(task_ptrace(p))) {
1486 /* 1486 /*
1487 * This child is hidden by ptrace. 1487 * This child is hidden by ptrace.
1488 * We aren't allowed to see it now, but eventually we will. 1488 * We aren't allowed to see it now, but eventually we will.