aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2008-11-14 16:50:01 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2008-11-14 16:50:01 +0000
commit3f4ed681c2e16ab7a73e31835a6a7e29d5857dd7 (patch)
tree24bb72d178c0af32aeabf43aaa3dd2af5cfb1ed5 /src
parent6fedb7aa0f76c34bccedd14095bcc7824006489d (diff)
* Prevent zombies. Previous the SIGCHLD handler only reaped one
zombie at a time, so if multiple children died before the handler got to run, some of them would not be cleaned up.
Diffstat (limited to 'src')
-rw-r--r--src/nix-worker/nix-worker.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix-worker/nix-worker.cc b/src/nix-worker/nix-worker.cc
index 7511b1c2c..dc9db0be4 100644
--- a/src/nix-worker/nix-worker.cc
+++ b/src/nix-worker/nix-worker.cc
@@ -534,7 +534,7 @@ static void processConnection()
static void sigChldHandler(int sigNo)
{
/* Reap all dead children. */
- while (waitpid(-1, 0, WNOHANG) == 0) ;
+ while (waitpid(-1, 0, WNOHANG) > 0) ;
}