[PATCH 5/4] tracehook_notify_death: use task_detached() helper

From: Oleg Nesterov
Date: Wed Feb 11 2009 - 16:16:29 EST


Now that task_detached() is exported, change tracehook_notify_death()
to use this helper, nobody else checks ->exit_signal == -1 by hand.

Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx>

--- 6.29-rc3/include/linux/tracehook.h~5_NOTIFY_USE_HELPER 2008-10-10 00:13:53.000000000 +0200
+++ 6.29-rc3/include/linux/tracehook.h 2009-02-11 21:54:57.000000000 +0100
@@ -507,7 +507,7 @@ static inline int tracehook_notify_jctl(
static inline int tracehook_notify_death(struct task_struct *task,
void **death_cookie, int group_dead)
{
- if (task->exit_signal == -1)
+ if (task_detached(task))
return task->ptrace ? SIGCHLD : DEATH_REAP;

/*

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/