diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2008-11-14T16·50+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2008-11-14T16·50+0000 |
commit | 3f4ed681c2e16ab7a73e31835a6a7e29d5857dd7 (patch) | |
tree | 24bb72d178c0af32aeabf43aaa3dd2af5cfb1ed5 /src/nix-worker | |
parent | 6fedb7aa0f76c34bccedd14095bcc7824006489d (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/nix-worker')
-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 7511b1c2c1e7..dc9db0be427c 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) ; } |