Skip to content
Snippets Groups Projects
Commit e9282dbb authored by Haarst, Jan van's avatar Haarst, Jan van
Browse files

another off by one bug removed

parent 4ca126b2
No related branches found
No related tags found
No related merge requests found
...@@ -52,7 +52,10 @@ while ($number_of_sinks >0) { ...@@ -52,7 +52,10 @@ while ($number_of_sinks >0) {
} }
# All sinks are being worked on, now wait for them to finish. # All sinks are being worked on, now wait for them to finish.
while (scalar keys %processes) { while (scalar keys %processes) {
print "waiting for ".(scalar keys %processes)." childs to exit\n"; print "waiting for ".(scalar keys %processes);
print " child";
print "s" if (scalar keys %processes >1);
print " to exit\n";
sleep 10; sleep 10;
} }
# Print out errors # Print out errors
...@@ -90,7 +93,7 @@ sub REAPER { ...@@ -90,7 +93,7 @@ sub REAPER {
sub fork_sync { sub fork_sync {
# Fork as many processes as there are seeds # Fork as many processes as there are seeds
foreach (@seeds) { foreach (@seeds) {
$number_of_sinks=scalar(@sinks)-1; $number_of_sinks=scalar(@sinks);
# The while checks at the end of the loop, which is too late # The while checks at the end of the loop, which is too late
next if $number_of_sinks <=0; next if $number_of_sinks <=0;
# grab the seed and sink from the arrays # grab the seed and sink from the arrays
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment