Changeset View
Changeset View
Standalone View
Standalone View
sys/compat/linux/linux_fork.c
Show First 20 Lines • Show All 227 Lines • ▼ Show 20 Lines | #endif | ||||
if (args->flags & LINUX_CLONE_SETTLS) | if (args->flags & LINUX_CLONE_SETTLS) | ||||
linux_set_cloned_tls(td2, args->tls); | linux_set_cloned_tls(td2, args->tls); | ||||
/* | /* | ||||
* If CLONE_PARENT is set, then the parent of the new process will be | * If CLONE_PARENT is set, then the parent of the new process will be | ||||
* the same as that of the calling process. | * the same as that of the calling process. | ||||
*/ | */ | ||||
if (args->flags & LINUX_CLONE_PARENT) { | if (args->flags & LINUX_CLONE_PARENT) { | ||||
sx_xlock(&proctree_lock); | sx_xlock(&V_proctree_lock); | ||||
PROC_LOCK(p2); | PROC_LOCK(p2); | ||||
proc_reparent(p2, td->td_proc->p_pptr); | proc_reparent(p2, td->td_proc->p_pptr); | ||||
PROC_UNLOCK(p2); | PROC_UNLOCK(p2); | ||||
sx_xunlock(&proctree_lock); | sx_xunlock(&V_proctree_lock); | ||||
} | } | ||||
#ifdef DEBUG | #ifdef DEBUG | ||||
if (ldebug(clone)) | if (ldebug(clone)) | ||||
printf(LMSG("clone: successful rfork to %d, " | printf(LMSG("clone: successful rfork to %d, " | ||||
"stack %p sig = %d"), (int)p2->p_pid, args->stack, | "stack %p sig = %d"), (int)p2->p_pid, args->stack, | ||||
exit_signal); | exit_signal); | ||||
#endif | #endif | ||||
▲ Show 20 Lines • Show All 245 Lines • Show Last 20 Lines |