linux-user: Fix fork() and vfork()
PATCH 1/1 linux-user: Fix fork() and vfork()
A check was introduced in 5ea2fc84da1bffce749c9d0848f5336def2818bb which causes fork() and vfork() to fail if TARGET_SIGCHLD != SIGCHLD.
Signed-off-by Tim Hentenaar <[email protected]>
--- linux-user/syscall.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
linux-user/syscall.c +2 -2
@@ -7680,7 +7680,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,break ;#ifdef TARGET_NR_forkcase TARGET_NR_fork: - ret =get_errno (do_fork (cpu_env,SIGCHLD ,0 ,0 ,0 ,0 )); + ret =get_errno (do_fork (cpu_env,TARGET_SIGCHLD ,0 ,0 ,0 ,0 ));break ;#endif #ifdef TARGET_NR_waitpid
@@ -10490,7 +10490,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,#endif #ifdef TARGET_NR_vforkcase TARGET_NR_vfork: - ret =get_errno (do_fork (cpu_env,CLONE_VFORK |CLONE_VM |SIGCHLD , + ret =get_errno (do_fork (cpu_env,CLONE_VFORK |CLONE_VM |TARGET_SIGCHLD ,0 ,0 ,0 ,0 ));break ;#endif
Signature · 1 line
2.10.2
Quoted 7 lines · Tim Hentenaar
A check was introduced in
5ea2fc84da1bffce749c9d0848f5336def2818bbwhich causesfork()andvfork()to fail ifTARGET_SIGCHLD!= SIGCHLD.Signed-off-by Tim Hentenaar <[email protected]>--- linux-user/syscall.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Thanks for this patch. In fact the equivalent bugfix has just hit QEMU git master, as commit 7eddb5ddacb783ba.
thanks
-- PMM