diff --git a/fastcopy.pl b/fastcopy.pl index 52f2b03a82d17164784273841da2ce5563fd2662..cd6f212a98d1136199f5c235632d2520fb415263 100755 --- a/fastcopy.pl +++ b/fastcopy.pl @@ -52,7 +52,10 @@ while ($number_of_sinks >0) { } # All sinks are being worked on, now wait for them to finish. 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; } # Print out errors @@ -90,7 +93,7 @@ sub REAPER { sub fork_sync { # Fork as many processes as there are 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 next if $number_of_sinks <=0; # grab the seed and sink from the arrays