Skip to contentSkip to conversation

tracehook_notify_death: use task_detached() helper

PATCH Oleg Nesterov 2 participants 2 messages Feb 11, 2009 – Feb 20, 2009 Tracing

lore
Share & tools
lore
#0 lore raw

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

include/linux/tracehook.h renamed from include/linux/tracehook.h~5_NOTIFY_USE_HELPER +1 -1
@@ -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;
 
 	/*