X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=perl%2Fcluster.pl;h=1e850c90f8b9c74a030a1cab913f770d4d86f218;hb=a9fb1f86dd478133c73deb76fc89442cbdd9443b;hp=eabc56e62dc1737437a2c27ba2d520fe8e15592f;hpb=50658a091d92a13b20823326a9f864d1a08817ba;p=spider.git diff --git a/perl/cluster.pl b/perl/cluster.pl index eabc56e6..1e850c90 100755 --- a/perl/cluster.pl +++ b/perl/cluster.pl @@ -239,11 +239,12 @@ sub cease # the reaper of children sub reap { - $SIG{'CHLD'} = \&reap; my $cpid; - while (($cpid = waitpid(1, &WNOHANG) != -1)) { + while (($cpid = waitpid(1, &WNOHANG)) != -1) { + dbg('reap', "cpid: $cpid"); @outstanding_connects = grep {$_->{pid} != $cpid} @outstanding_connects; } + dbg('reap', "cpid: $cpid"); } # this is where the input queue is dealt with and things are dispatched off to other parts of