diff options
author | Robert Swiecki <robert@swiecki.net> | 2019-02-19 08:52:56 +0100 |
---|---|---|
committer | Robert Swiecki <robert@swiecki.net> | 2019-02-19 08:52:56 +0100 |
commit | bbc55ad54aab854e33c80390b034a4eafd69a46b (patch) | |
tree | 938a74914b778236be3286ecf79b08ce27c83e8c /netbsd | |
parent | 356edf41dac986042eb4a2989c507e792e255f24 (diff) | |
download | honggfuzz-bbc55ad54aab854e33c80390b034a4eafd69a46b.tar.gz |
netbsd/mac: use EINTR loop for wait
Diffstat (limited to 'netbsd')
-rw-r--r-- | netbsd/arch.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/netbsd/arch.c b/netbsd/arch.c index 63b758e5..bacd1ee1 100644 --- a/netbsd/arch.c +++ b/netbsd/arch.c @@ -138,15 +138,12 @@ static bool arch_checkWait(run_t* run) { for (;;) { int status; /* Wait for the whole process group of run->pid */ - pid_t pid = wait6(P_SID, run->pid, &status, + pid_t pid = TEMP_FAILURE_RETRY(wait6(P_SID, run->pid, &status, WALLSIG | WALTSIG | WTRAPPED | WEXITED | WUNTRACED | WCONTINUED | WSTOPPED | WNOHANG, - NULL, NULL); + NULL, NULL)); if (pid == 0) { return false; } - if (pid == -1 && errno == EINTR) { - return false; - } if (pid == -1 && errno == ECHILD) { LOG_D("No more processes to track"); return true; |