Commit Diff


commit - efcae1c6b4f75d8d4ac062a029c8c2e038aec2f9
commit + eb73a30f7effc51c1cfee2864102635e3659f87a
blob - a9a2ff870d95e06414219ee6bba3bd2fcaa23188
blob + 7e6cbb92158fae37548623fa806cb03a13e55320
--- lib/privsep.c
+++ lib/privsep.c
@@ -95,7 +95,8 @@ got_privsep_wait_for_child(pid_t pid)
 {
 	int child_status;
 
-	waitpid(pid, &child_status, 0);
+	if (waitpid(pid, &child_status, WNOHANG) == 0)
+		return NULL;
 
 	if (!WIFEXITED(child_status))
 		return got_error(GOT_ERR_PRIVSEP_DIED);