aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux-user/syscall.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 549f571aae..7d5f1234af 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -4796,6 +4796,11 @@ static int do_fork(CPUArchState *env, unsigned int flags, abi_ulong newsp,
if ((flags & ~(CSIGNAL | CLONE_NPTL_FLAGS2)) != 0) {
return -TARGET_EINVAL;
}
+
+ if (block_signals()) {
+ return -TARGET_ERESTARTSYS;
+ }
+
fork_start();
ret = fork();
if (ret == 0) {