diff options
Diffstat (limited to 'kernel/fork.c')
-rw-r--r-- | kernel/fork.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index c49bd193b058..74c67629ee62 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -1181,7 +1181,7 @@ static task_t *copy_process(unsigned long clone_flags, | |||
1181 | */ | 1181 | */ |
1182 | p->ioprio = current->ioprio; | 1182 | p->ioprio = current->ioprio; |
1183 | 1183 | ||
1184 | SET_LINKS(p); | 1184 | add_parent(p); |
1185 | if (unlikely(p->ptrace & PT_PTRACED)) | 1185 | if (unlikely(p->ptrace & PT_PTRACED)) |
1186 | __ptrace_link(p, current->parent); | 1186 | __ptrace_link(p, current->parent); |
1187 | 1187 | ||
@@ -1191,6 +1191,8 @@ static task_t *copy_process(unsigned long clone_flags, | |||
1191 | p->signal->session = current->signal->session; | 1191 | p->signal->session = current->signal->session; |
1192 | attach_pid(p, PIDTYPE_PGID, process_group(p)); | 1192 | attach_pid(p, PIDTYPE_PGID, process_group(p)); |
1193 | attach_pid(p, PIDTYPE_SID, p->signal->session); | 1193 | attach_pid(p, PIDTYPE_SID, p->signal->session); |
1194 | |||
1195 | list_add_tail(&p->tasks, &init_task.tasks); | ||
1194 | if (p->pid) | 1196 | if (p->pid) |
1195 | __get_cpu_var(process_counts)++; | 1197 | __get_cpu_var(process_counts)++; |
1196 | } | 1198 | } |