diff options
Diffstat (limited to 'executor/executor_bsd.h')
| -rw-r--r-- | executor/executor_bsd.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/executor/executor_bsd.h b/executor/executor_bsd.h index 6c2174360..43c2a19a9 100644 --- a/executor/executor_bsd.h +++ b/executor/executor_bsd.h @@ -41,6 +41,11 @@ static void os_init(int argc, char** argv, void* data, size_t data_size) struct rlimit rlim; rlim.rlim_cur = rlim.rlim_max = kMaxFd; setrlimit(RLIMIT_NOFILE, &rlim); + + // 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]) |
