revert eb73a30f7effc51c1cfee2864102635e3659f87a Not waiting for children can make us blow the fork() ulimit with lingering zombies; the Ctrl-C issue will need some other fix.
diff --git a/lib/privsep.c b/lib/privsep.c
index 7e6cbb9..1dd3880 100644
--- a/lib/privsep.c
+++ b/lib/privsep.c
@@ -95,8 +95,8 @@ got_privsep_wait_for_child(pid_t pid)
{
int child_status;
- if (waitpid(pid, &child_status, WNOHANG) == 0)
- return NULL;
+ if (waitpid(pid, &child_status, 0) == -1)
+ return got_error_from_errno();
if (!WIFEXITED(child_status))
return got_error(GOT_ERR_PRIVSEP_DIED);