diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/fork.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 3683ce10f4a9..fbea12d7a943 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -1173,8 +1173,6 @@ static task_t *copy_process(unsigned long clone_flags, | |||
1173 | if (unlikely(p->ptrace & PT_PTRACED)) | 1173 | if (unlikely(p->ptrace & PT_PTRACED)) |
1174 | __ptrace_link(p, current->parent); | 1174 | __ptrace_link(p, current->parent); |
1175 | 1175 | ||
1176 | attach_pid(p, PIDTYPE_PID, p->pid); | ||
1177 | attach_pid(p, PIDTYPE_TGID, p->tgid); | ||
1178 | if (thread_group_leader(p)) { | 1176 | if (thread_group_leader(p)) { |
1179 | p->signal->tty = current->signal->tty; | 1177 | p->signal->tty = current->signal->tty; |
1180 | p->signal->pgrp = process_group(current); | 1178 | p->signal->pgrp = process_group(current); |
@@ -1184,6 +1182,8 @@ static task_t *copy_process(unsigned long clone_flags, | |||
1184 | if (p->pid) | 1182 | if (p->pid) |
1185 | __get_cpu_var(process_counts)++; | 1183 | __get_cpu_var(process_counts)++; |
1186 | } | 1184 | } |
1185 | attach_pid(p, PIDTYPE_TGID, p->tgid); | ||
1186 | attach_pid(p, PIDTYPE_PID, p->pid); | ||
1187 | 1187 | ||
1188 | nr_threads++; | 1188 | nr_threads++; |
1189 | total_forks++; | 1189 | total_forks++; |