Skip to content

Commit

Permalink
reproc: Fix POSIX wait with timeout of zero.
Browse files Browse the repository at this point in the history
  • Loading branch information
DaanDeMeyer committed Jan 6, 2020
1 parent c68f038 commit a4082b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion reproc/src/posix/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit a4082b0

Please sign in to comment.