All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit e550f14d authored by Oleg Nesterov's avatar Oleg Nesterov

kill task_detached()

Upadate the last user of task_detached(), wait_task_zombie(), to
use thread_group_leader() and kill task_detached().
Signed-off-by: default avatarOleg Nesterov <>
Reviewed-by: default avatarTejun Heo <>
parent 0976a03e
......@@ -2318,11 +2318,6 @@ static inline int thread_group_empty(struct task_struct *p)
#define delay_group_leader(p) \
(thread_group_leader(p) && !thread_group_empty(p))
static inline int task_detached(struct task_struct *p)
return p->exit_signal == -1;
* Protects ->fs, ->files, ->mm, ->group_info, ->comm, keyring
* subscriptions and synchronises with wait4(). Also used in procfs. Also
......@@ -189,7 +189,6 @@ repeat:
zap_leader = 0;
leader = p->group_leader;
if (leader != p && thread_group_empty(leader) && leader->exit_state == EXIT_ZOMBIE) {
* If we were the last child thread and the leader has
* exited already, and the leader's parent ignores SIGCHLD,
......@@ -1231,9 +1230,9 @@ static int wait_task_zombie(struct wait_opts *wo, struct task_struct *p)
traced = ptrace_reparented(p);
* It can be ptraced but not reparented, check
* !task_detached() to filter out sub-threads.
* thread_group_leader() to filter out sub-threads.
if (likely(!traced) && likely(!task_detached(p))) {
if (likely(!traced) && thread_group_leader(p)) {
struct signal_struct *psig;
struct signal_struct *sig;
unsigned long maxrss;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment