Skip to content

Commit d4f7c51

Browse files
committed
do not change dead_task->exit_signal
__ptrace_detach() and do_notify_parent() set task->exit_signal = -1 to mark the task dead. This is no longer needed, nobody checks exit_signal to detect the EXIT_DEAD task. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Reviewed-by: Tejun Heo <tj@kernel.org>
1 parent e550f14 commit d4f7c51

2 files changed

Lines changed: 0 additions & 2 deletions

File tree

‎kernel/ptrace.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,6 @@ static bool __ptrace_detach(struct task_struct *tracer, struct task_struct *p)
384384
dead = do_notify_parent(p, p->exit_signal);
385385
else if (ignoring_children(tracer->sighand)) {
386386
__wake_up_parent(p, tracer);
387-
p->exit_signal = -1;
388387
dead = true;
389388
}
390389
}

‎kernel/signal.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1650,7 +1650,6 @@ bool do_notify_parent(struct task_struct *tsk, int sig)
16501650
* it, just use SIG_IGN instead).
16511651
*/
16521652
autoreap = true;
1653-
tsk->exit_signal = -1;
16541653
if (psig->action[SIGCHLD-1].sa.sa_handler == SIG_IGN)
16551654
sig = 0;
16561655
}

0 commit comments

Comments
 (0)