From a4082b03c15f969aaa19614b2bc9f5beae7d97ac Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Mon, 6 Jan 2020 19:58:45 +0100 Subject: [PATCH] reproc: Fix POSIX wait with timeout of zero. --- reproc/src/posix/process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reproc/src/posix/process.c b/reproc/src/posix/process.c index 1d68c2336..3b20ab16a 100644 --- a/reproc/src/posix/process.c +++ b/reproc/src/posix/process.c @@ -356,7 +356,7 @@ int process_wait(pid_t process, int timeout) if (timeout <= 0) { r = waitpid(process, &status, timeout == 0 ? WNOHANG : 0); - if (r >= 0) { + if (r > 0) { assert(r == process); status = parse_status(status); }