aboutsummaryrefslogtreecommitdiffstats
path: root/executor/executor_linux.h
diff options
context:
space:
mode:
Diffstat (limited to 'executor/executor_linux.h')
-rw-r--r--executor/executor_linux.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/executor/executor_linux.h b/executor/executor_linux.h
index 3956127cd..bfd81776f 100644
--- a/executor/executor_linux.h
+++ b/executor/executor_linux.h
@@ -67,6 +67,11 @@ static void os_init(int argc, char** argv, char* data, size_t data_size)
got = mmap(data + data_size, SYZ_PAGE_SIZE, PROT_NONE, MAP_ANON | MAP_PRIVATE | MAP_FIXED, -1, 0);
if (data + data_size != got)
failmsg("mmap of right data PROT_NONE page failed", "want %p, got %p", data + data_size, got);
+
+ // A SIGCHLD handler makes sleep in loop exit immediately return with EINTR with a child exits.
+ struct sigaction act = {};
+ act.sa_handler = [](int) {};
+ sigaction(SIGCHLD, &act, nullptr);
}
static intptr_t execute_syscall(const call_t* c, intptr_t a[kMaxArgs])