diff options
-rw-r--r-- | fs/exec.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -707,7 +707,7 @@ static int de_thread(struct task_struct *tsk) | |||
707 | attach_pid(current, PIDTYPE_PID, current->pid); | 707 | attach_pid(current, PIDTYPE_PID, current->pid); |
708 | attach_pid(current, PIDTYPE_PGID, current->signal->pgrp); | 708 | attach_pid(current, PIDTYPE_PGID, current->signal->pgrp); |
709 | attach_pid(current, PIDTYPE_SID, current->signal->session); | 709 | attach_pid(current, PIDTYPE_SID, current->signal->session); |
710 | list_add_tail_rcu(¤t->tasks, &init_task.tasks); | 710 | list_replace_rcu(&leader->tasks, ¤t->tasks); |
711 | 711 | ||
712 | current->group_leader = current; | 712 | current->group_leader = current; |
713 | leader->group_leader = current; | 713 | leader->group_leader = current; |
@@ -715,7 +715,6 @@ static int de_thread(struct task_struct *tsk) | |||
715 | /* Reduce leader to a thread */ | 715 | /* Reduce leader to a thread */ |
716 | detach_pid(leader, PIDTYPE_PGID); | 716 | detach_pid(leader, PIDTYPE_PGID); |
717 | detach_pid(leader, PIDTYPE_SID); | 717 | detach_pid(leader, PIDTYPE_SID); |
718 | list_del_init(&leader->tasks); | ||
719 | 718 | ||
720 | current->exit_signal = SIGCHLD; | 719 | current->exit_signal = SIGCHLD; |
721 | 720 | ||