diff options
author | Rob Landley <rob@landley.net> | 2021-05-15 10:48:44 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2021-05-15 10:48:44 -0500 |
commit | 08481ee37ad5070ff1033d57351c3fa456d0729d (patch) | |
tree | 6319836809da837a9dcf54767cc1ca4225eb89bc | |
parent | 3670ac7432ea5eb31f7432a20c596c1a990f9975 (diff) | |
download | toybox-08481ee37ad5070ff1033d57351c3fa456d0729d.tar.gz |
Clear errno in loop.
Fixes theoretical bug I haven't actually seen.
-rw-r--r-- | lib/xwrap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/xwrap.c b/lib/xwrap.c index 64137da9..1e1019a2 100644 --- a/lib/xwrap.c +++ b/lib/xwrap.c @@ -338,7 +338,7 @@ int xwaitpid(pid_t pid) { int status; - while (-1 == waitpid(pid, &status, 0) && errno == EINTR); + while (-1 == waitpid(pid, &status, 0) && errno == EINTR) errno = 0; return WIFEXITED(status) ? WEXITSTATUS(status) : WTERMSIG(status)+128; } |