summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authornetchild <netchild@FreeBSD.org>2007-01-14 16:20:37 +0000
committernetchild <netchild@FreeBSD.org>2007-01-14 16:20:37 +0000
commit4ffc7bc7ea2d330c7b7b2a57f5226e040a45692e (patch)
tree57bc52d363d24ee2a548896b3c95b50320575a58 /sys
parent48557a3c88d9826b668405c0e43691dc9d33fd21 (diff)
downloadFreeBSD-src-4ffc7bc7ea2d330c7b7b2a57f5226e040a45692e.zip
FreeBSD-src-4ffc7bc7ea2d330c7b7b2a57f5226e040a45692e.tar.gz
MFp4 (112893):
Make linux_vfork() actually work. This enables make to work again with 2.6. It also fixes the LTP vfork tests. Submitted by: rdivacky
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/linux32/linux32_machdep.c1
-rw-r--r--sys/i386/linux/linux_machdep.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/sys/amd64/linux32/linux32_machdep.c b/sys/amd64/linux32/linux32_machdep.c
index 7a164863..4d03d77 100644
--- a/sys/amd64/linux32/linux32_machdep.c
+++ b/sys/amd64/linux32/linux32_machdep.c
@@ -497,6 +497,7 @@ linux_vfork(struct thread *td, struct linux_vfork_args *args)
return (error);
/* wait for the children to exit, ie. emulate vfork */
PROC_LOCK(p2);
+ p2->p_flag |= P_PPWAIT;
while (p2->p_flag & P_PPWAIT)
msleep(td->td_proc, &p2->p_mtx, PWAIT, "ppwait", 0);
PROC_UNLOCK(p2);
diff --git a/sys/i386/linux/linux_machdep.c b/sys/i386/linux/linux_machdep.c
index 8ff50e1..5b1f6b1 100644
--- a/sys/i386/linux/linux_machdep.c
+++ b/sys/i386/linux/linux_machdep.c
@@ -341,6 +341,7 @@ linux_vfork(struct thread *td, struct linux_vfork_args *args)
return (error);
/* wait for the children to exit, ie. emulate vfork */
PROC_LOCK(p2);
+ p2->p_flag |= P_PPWAIT;
while (p2->p_flag & P_PPWAIT)
msleep(td->td_proc, &p2->p_mtx, PWAIT, "ppwait", 0);
PROC_UNLOCK(p2);
OpenPOWER on IntegriCloud