From 08481ee37ad5070ff1033d57351c3fa456d0729d Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sat, 15 May 2021 10:48:44 -0500 Subject: Clear errno in loop. Fixes theoretical bug I haven't actually seen. --- lib/xwrap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v1.2.3