diff options
Diffstat (limited to 'kernel/fork.c')
-rw-r--r-- | kernel/fork.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 8de303bdd4e5..6715ebc3761d 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -1184,10 +1184,6 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1184 | #endif | 1184 | #endif |
1185 | clear_all_latency_tracing(p); | 1185 | clear_all_latency_tracing(p); |
1186 | 1186 | ||
1187 | /* Our parent execution domain becomes current domain | ||
1188 | These must match for thread signalling to apply */ | ||
1189 | p->parent_exec_id = p->self_exec_id; | ||
1190 | |||
1191 | /* ok, now we should be set up.. */ | 1187 | /* ok, now we should be set up.. */ |
1192 | p->exit_signal = (clone_flags & CLONE_THREAD) ? -1 : (clone_flags & CSIGNAL); | 1188 | p->exit_signal = (clone_flags & CLONE_THREAD) ? -1 : (clone_flags & CSIGNAL); |
1193 | p->pdeath_signal = 0; | 1189 | p->pdeath_signal = 0; |
@@ -1225,10 +1221,13 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1225 | set_task_cpu(p, smp_processor_id()); | 1221 | set_task_cpu(p, smp_processor_id()); |
1226 | 1222 | ||
1227 | /* CLONE_PARENT re-uses the old parent */ | 1223 | /* CLONE_PARENT re-uses the old parent */ |
1228 | if (clone_flags & (CLONE_PARENT|CLONE_THREAD)) | 1224 | if (clone_flags & (CLONE_PARENT|CLONE_THREAD)) { |
1229 | p->real_parent = current->real_parent; | 1225 | p->real_parent = current->real_parent; |
1230 | else | 1226 | p->parent_exec_id = current->parent_exec_id; |
1227 | } else { | ||
1231 | p->real_parent = current; | 1228 | p->real_parent = current; |
1229 | p->parent_exec_id = current->self_exec_id; | ||
1230 | } | ||
1232 | 1231 | ||
1233 | spin_lock(¤t->sighand->siglock); | 1232 | spin_lock(¤t->sighand->siglock); |
1234 | 1233 | ||