|
@@ -707,7 +707,7 @@ static int de_thread(struct task_struct *tsk)
|
|
attach_pid(current, PIDTYPE_PID, current->pid);
|
|
attach_pid(current, PIDTYPE_PID, current->pid);
|
|
attach_pid(current, PIDTYPE_PGID, current->signal->pgrp);
|
|
attach_pid(current, PIDTYPE_PGID, current->signal->pgrp);
|
|
attach_pid(current, PIDTYPE_SID, current->signal->session);
|
|
attach_pid(current, PIDTYPE_SID, current->signal->session);
|
|
- list_add_tail_rcu(¤t->tasks, &init_task.tasks);
|
|
|
|
|
|
+ list_replace_rcu(&leader->tasks, ¤t->tasks);
|
|
|
|
|
|
current->group_leader = current;
|
|
current->group_leader = current;
|
|
leader->group_leader = current;
|
|
leader->group_leader = current;
|
|
@@ -715,7 +715,6 @@ static int de_thread(struct task_struct *tsk)
|
|
/* Reduce leader to a thread */
|
|
/* Reduce leader to a thread */
|
|
detach_pid(leader, PIDTYPE_PGID);
|
|
detach_pid(leader, PIDTYPE_PGID);
|
|
detach_pid(leader, PIDTYPE_SID);
|
|
detach_pid(leader, PIDTYPE_SID);
|
|
- list_del_init(&leader->tasks);
|
|
|
|
|
|
|
|
current->exit_signal = SIGCHLD;
|
|
current->exit_signal = SIGCHLD;
|
|
|
|
|