|
@@ -1946,6 +1946,7 @@ static __latent_entropy struct task_struct *copy_process(
|
|
|
|
|
|
init_task_pid(p, PIDTYPE_PID, pid);
|
|
|
if (thread_group_leader(p)) {
|
|
|
+ init_task_pid(p, PIDTYPE_TGID, pid);
|
|
|
init_task_pid(p, PIDTYPE_PGID, task_pgrp(current));
|
|
|
init_task_pid(p, PIDTYPE_SID, task_session(current));
|
|
|
|
|
@@ -1954,7 +1955,6 @@ static __latent_entropy struct task_struct *copy_process(
|
|
|
p->signal->flags |= SIGNAL_UNKILLABLE;
|
|
|
}
|
|
|
|
|
|
- p->signal->leader_pid = pid;
|
|
|
p->signal->tty = tty_kref_get(current->signal->tty);
|
|
|
/*
|
|
|
* Inherit has_child_subreaper flag under the same
|
|
@@ -1965,6 +1965,7 @@ static __latent_entropy struct task_struct *copy_process(
|
|
|
p->real_parent->signal->is_child_subreaper;
|
|
|
list_add_tail(&p->sibling, &p->real_parent->children);
|
|
|
list_add_tail_rcu(&p->tasks, &init_task.tasks);
|
|
|
+ attach_pid(p, PIDTYPE_TGID);
|
|
|
attach_pid(p, PIDTYPE_PGID);
|
|
|
attach_pid(p, PIDTYPE_SID);
|
|
|
__this_cpu_inc(process_counts);
|