aboutsummaryrefslogtreecommitdiff
path: root/tests/ftp.pm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ftp.pm')
-rw-r--r--tests/ftp.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/ftp.pm b/tests/ftp.pm
index 28bbb4ea6..1b45014a6 100644
--- a/tests/ftp.pm
+++ b/tests/ftp.pm
@@ -85,7 +85,11 @@ sub killpid {
# stop it, otherwise reap it if this has not been done yet.
my @signalled;
my $prev = 0;
- my @pids = sort({$a <=> $b} split(/\s+/, $pidlist));
+ my @pids = split(' ', $pidlist);
+ if(scalar(@pids) > 2) {
+ my @sorted = sort({$a <=> $b} @pids);
+ @pids = @sorted;
+ }
foreach my $tmp (@pids) {
chomp $tmp;
if($tmp =~ /^(\d+)$/) {