diff options
author | Robert Swiecki <robert@swiecki.net> | 2019-02-14 23:02:13 +0100 |
---|---|---|
committer | Robert Swiecki <robert@swiecki.net> | 2019-02-14 23:02:13 +0100 |
commit | 64d52436fd74340d09c0a6615894f4791baffb15 (patch) | |
tree | 87aa8018d873695f00188f61dda6a441ef4e7a4d /mac | |
parent | 0c52f7defe6668f7ccc7ff2033cbf9bb90cc8182 (diff) | |
download | honggfuzz-64d52436fd74340d09c0a6615894f4791baffb15.tar.gz |
create a signal thread to distribute SIGCHLD as SIGUSR1
Diffstat (limited to 'mac')
-rw-r--r-- | mac/arch.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -382,11 +382,16 @@ void arch_reapChild(run_t* run) { if (r == -1 && errno != EINTR) { PLOG_F("poll(fd=%d)", run->persistentSock); } + } else { + /* Return with SIGIO, SIGCHLD and with SIGUSR1 */ + int sig = sigwaitinfo(&run->global->exe.waitSigSet, NULL); + if (sig == -1 && (errno != EAGAIN && errno != EINTR)) { + PLOG_F("sigwaitinfo(SIGIO|SIGCHLD|SIGUSR1)"); + } } int status; - int flags = run->global->exe.persistent ? WNOHANG : 0; - int ret = waitpid(run->pid, &status, flags); + int ret = waitpid(run->pid, &status, WNOHANG); if (ret == 0) { continue; } |