do not change dead_task->exit_signal
authorOleg Nesterov <oleg@redhat.com>
Wed, 22 Jun 2011 21:10:11 +0000 (23:10 +0200)
committerOleg Nesterov <oleg@redhat.com>
Mon, 27 Jun 2011 18:30:10 +0000 (20:30 +0200)
__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>
kernel/ptrace.c
kernel/signal.c

index 66a28bd71ef6c6e303b654eb0457ebfe26e9376f..d7ccc79454f54ee39c364590a2409c096d7dc352 100644 (file)
@@ -384,7 +384,6 @@ static bool __ptrace_detach(struct task_struct *tracer, struct task_struct *p)
                        dead = do_notify_parent(p, p->exit_signal);
                else if (ignoring_children(tracer->sighand)) {
                        __wake_up_parent(p, tracer);
-                       p->exit_signal = -1;
                        dead = true;
                }
        }
index d52e82cd62bbf8d60f01d47b3c201f1ada18d998..4c4ad34caf77cbe52d6f22935485621efc3156cf 100644 (file)
@@ -1650,7 +1650,6 @@ bool do_notify_parent(struct task_struct *tsk, int sig)
                 * it, just use SIG_IGN instead).
                 */
                autoreap = true;
-               tsk->exit_signal = -1;
                if (psig->action[SIGCHLD-1].sa.sa_handler == SIG_IGN)
                        sig = 0;
        }