Changeset View
Changeset View
Standalone View
Standalone View
head/sys/compat/linux/linux_fork.c
Show All 35 Lines | |||||
#include <sys/imgact.h> | #include <sys/imgact.h> | ||||
#include <sys/lock.h> | #include <sys/lock.h> | ||||
#include <sys/mutex.h> | #include <sys/mutex.h> | ||||
#include <sys/proc.h> | #include <sys/proc.h> | ||||
#include <sys/sched.h> | #include <sys/sched.h> | ||||
#include <sys/sdt.h> | #include <sys/sdt.h> | ||||
#include <sys/sx.h> | #include <sys/sx.h> | ||||
#include <sys/unistd.h> | #include <sys/unistd.h> | ||||
#include <sys/wait.h> | |||||
#ifdef COMPAT_LINUX32 | #ifdef COMPAT_LINUX32 | ||||
#include <machine/../linux32/linux.h> | #include <machine/../linux32/linux.h> | ||||
#include <machine/../linux32/linux32_proto.h> | #include <machine/../linux32/linux32_proto.h> | ||||
#else | #else | ||||
#include <machine/../linux/linux.h> | #include <machine/../linux/linux.h> | ||||
#include <machine/../linux/linux_proto.h> | #include <machine/../linux/linux_proto.h> | ||||
#endif | #endif | ||||
▲ Show 20 Lines • Show All 239 Lines • ▼ Show 20 Lines | if (args->flags & LINUX_CLONE_VFORK) { | ||||
/* wait for the children to exit, ie. emulate vfork */ | /* wait for the children to exit, ie. emulate vfork */ | ||||
PROC_LOCK(p2); | PROC_LOCK(p2); | ||||
while (p2->p_flag & P_PPWAIT) | while (p2->p_flag & P_PPWAIT) | ||||
cv_wait(&p2->p_pwait, &p2->p_mtx); | cv_wait(&p2->p_pwait, &p2->p_mtx); | ||||
PROC_UNLOCK(p2); | PROC_UNLOCK(p2); | ||||
} | } | ||||
return (0); | return (0); | ||||
} | |||||
int | |||||
linux_exit(struct thread *td, struct linux_exit_args *args) | |||||
{ | |||||
#ifdef DEBUG | |||||
if (ldebug(exit)) | |||||
printf(ARGS(exit, "%d"), args->rval); | |||||
#endif | |||||
exit1(td, W_EXITCODE(args->rval, 0)); | |||||
/* NOTREACHED */ | |||||
} | } |