summaryrefslogtreecommitdiffstats
path: root/linux-user/syscall.c
diff options
context:
space:
mode:
authorbalrog2008-09-21 04:39:45 +0200
committerbalrog2008-09-21 04:39:45 +0200
commit436d124b7d538b1fd9cf72edf17770664c309856 (patch)
treee1b8c851a42cc33053ae84ec226ec3758628dcda /linux-user/syscall.c
parentFix TEST_BSX operands in test-i386.c (Zeev Tarantov). (diff)
downloadqemu-436d124b7d538b1fd9cf72edf17770664c309856.tar.gz
qemu-436d124b7d538b1fd9cf72edf17770664c309856.tar.xz
qemu-436d124b7d538b1fd9cf72edf17770664c309856.zip
Band-aid vfork() emulation (Kirill Shutemov).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5279 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r--linux-user/syscall.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 64d700d8f3..40c0ed83e8 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -2800,6 +2800,10 @@ static int do_fork(CPUState *env, unsigned int flags, abi_ulong newsp,
sigset_t sigmask;
#endif
+ /* Emulate vfork() with fork() */
+ if (flags & CLONE_VFORK)
+ flags &= ~(CLONE_VFORK | CLONE_VM);
+
if (flags & CLONE_VM) {
#if defined(USE_NPTL)
new_thread_info info;