diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2008-11-14 16:50:01 +0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2008-11-14 16:50:01 +0000 |
commit | 3f4ed681c2e16ab7a73e31835a6a7e29d5857dd7 (patch) | |
tree | 24bb72d178c0af32aeabf43aaa3dd2af5cfb1ed5 | |
parent | 6fedb7aa0f76c34bccedd14095bcc7824006489d (diff) | |
download | guix-3f4ed681c2e16ab7a73e31835a6a7e29d5857dd7.tar.gz |
* 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.
-rw-r--r-- | src/nix-worker/nix-worker.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix-worker/nix-worker.cc b/src/nix-worker/nix-worker.cc index 7511b1c2c1..dc9db0be42 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) ; } |