diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/exec.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -723,7 +723,12 @@ static int de_thread(struct task_struct *tsk) | |||
723 | current->parent = current->real_parent = leader->real_parent; | 723 | current->parent = current->real_parent = leader->real_parent; |
724 | leader->parent = leader->real_parent = child_reaper; | 724 | leader->parent = leader->real_parent = child_reaper; |
725 | current->group_leader = current; | 725 | current->group_leader = current; |
726 | leader->group_leader = leader; | 726 | leader->group_leader = current; |
727 | |||
728 | /* Reduce leader to a thread */ | ||
729 | detach_pid(leader, PIDTYPE_PGID); | ||
730 | detach_pid(leader, PIDTYPE_SID); | ||
731 | list_del_init(&leader->tasks); | ||
727 | 732 | ||
728 | add_parent(current); | 733 | add_parent(current); |
729 | add_parent(leader); | 734 | add_parent(leader); |