about summary refs log tree commit diff
path: root/src/nix-worker/nix-worker.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix-worker/nix-worker.cc')
-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 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) ;
 }