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) ; }