aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/xwrap.c2
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;
}