]> dxcluster.net Git - spider.git/commitdiff
make test on waitpid > 0 rather than -1
authorminima <minima>
Sat, 18 Nov 2000 21:41:45 +0000 (21:41 +0000)
committerminima <minima>
Sat, 18 Nov 2000 21:41:45 +0000 (21:41 +0000)
perl/cluster.pl

index 3e9a5a1152c10f9fd51299136c864def3de44398..e8858a0df531f2e8709e7d865b22bd4f2cfb8cd7 100755 (executable)
@@ -245,7 +245,7 @@ sub cease
 sub reap
 {
        my $cpid;
-       while (($cpid = waitpid(-1, WNOHANG)) != -1) {
+       while (($cpid = waitpid(-1, WNOHANG)) > 0) {
                dbg('reap', "cpid: $cpid");
                @outstanding_connects = grep {$_->{pid} != $cpid} @outstanding_connects;
                $zombies-- if $zombies > 0;