diff options
Diffstat (limited to 'kernel/fork.c')
-rw-r--r-- | kernel/fork.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index d2952162399b..cc5be0d01ce6 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -1946,6 +1946,7 @@ static __latent_entropy struct task_struct *copy_process( | |||
1946 | 1946 | ||
1947 | init_task_pid(p, PIDTYPE_PID, pid); | 1947 | init_task_pid(p, PIDTYPE_PID, pid); |
1948 | if (thread_group_leader(p)) { | 1948 | if (thread_group_leader(p)) { |
1949 | init_task_pid(p, PIDTYPE_TGID, pid); | ||
1949 | init_task_pid(p, PIDTYPE_PGID, task_pgrp(current)); | 1950 | init_task_pid(p, PIDTYPE_PGID, task_pgrp(current)); |
1950 | init_task_pid(p, PIDTYPE_SID, task_session(current)); | 1951 | init_task_pid(p, PIDTYPE_SID, task_session(current)); |
1951 | 1952 | ||
@@ -1954,7 +1955,6 @@ static __latent_entropy struct task_struct *copy_process( | |||
1954 | p->signal->flags |= SIGNAL_UNKILLABLE; | 1955 | p->signal->flags |= SIGNAL_UNKILLABLE; |
1955 | } | 1956 | } |
1956 | 1957 | ||
1957 | p->signal->leader_pid = pid; | ||
1958 | p->signal->tty = tty_kref_get(current->signal->tty); | 1958 | p->signal->tty = tty_kref_get(current->signal->tty); |
1959 | /* | 1959 | /* |
1960 | * Inherit has_child_subreaper flag under the same | 1960 | * Inherit has_child_subreaper flag under the same |
@@ -1965,6 +1965,7 @@ static __latent_entropy struct task_struct *copy_process( | |||
1965 | p->real_parent->signal->is_child_subreaper; | 1965 | p->real_parent->signal->is_child_subreaper; |
1966 | list_add_tail(&p->sibling, &p->real_parent->children); | 1966 | list_add_tail(&p->sibling, &p->real_parent->children); |
1967 | list_add_tail_rcu(&p->tasks, &init_task.tasks); | 1967 | list_add_tail_rcu(&p->tasks, &init_task.tasks); |
1968 | attach_pid(p, PIDTYPE_TGID); | ||
1968 | attach_pid(p, PIDTYPE_PGID); | 1969 | attach_pid(p, PIDTYPE_PGID); |
1969 | attach_pid(p, PIDTYPE_SID); | 1970 | attach_pid(p, PIDTYPE_SID); |
1970 | __this_cpu_inc(process_counts); | 1971 | __this_cpu_inc(process_counts); |