projects
/
spider.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
20a1e97
)
changed wait to waitpid in reaping
author
minima
<minima>
Thu, 16 Nov 2000 16:24:01 +0000
(16:24 +0000)
committer
minima
<minima>
Thu, 16 Nov 2000 16:24:01 +0000
(16:24 +0000)
Changes
patch
|
blob
|
history
perl/cluster.pl
patch
|
blob
|
history
diff --git
a/Changes
b/Changes
index 1162d9d1cf3e6ae56212644ccd1496ac89dbaa49..4c4a089a2fcb2698f1ecb2f56db6f6f6a9fc62a5 100644
(file)
--- a/
Changes
+++ b/
Changes
@@
-1,3
+1,5
@@
+16Nov00=======================================================================
+1. Alter the process reaping code in cluster.pl to use waitpid
12Nov00=======================================================================
1. Fix lack 't' action in Filter.pm
08Nov00=======================================================================
12Nov00=======================================================================
1. Fix lack 't' action in Filter.pm
08Nov00=======================================================================
diff --git
a/perl/cluster.pl
b/perl/cluster.pl
index a645da33f7325483e66bb348192595e3b9e99fc1..eabc56e62dc1737437a2c27ba2d520fe8e15592f 100755
(executable)
--- a/
perl/cluster.pl
+++ b/
perl/cluster.pl
@@
-66,6
+66,7
@@
use BadWords;
use Data::Dumper;
use Fcntl ':flock';
use Data::Dumper;
use Fcntl ':flock';
+use POSIX ":sys_wait_h";
use Local;
use Local;
@@
-239,8
+240,10
@@
sub cease
sub reap
{
$SIG{'CHLD'} = \&reap;
sub reap
{
$SIG{'CHLD'} = \&reap;
- my $cpid = wait;
- @outstanding_connects = grep {$_->{pid} != $cpid} @outstanding_connects;
+ my $cpid;
+ while (($cpid = waitpid(1, &WNOHANG) != -1)) {
+ @outstanding_connects = grep {$_->{pid} != $cpid} @outstanding_connects;
+ }
}
# this is where the input queue is dealt with and things are dispatched off to other parts of
}
# this is where the input queue is dealt with and things are dispatched off to other parts of