diff options
author | Yang Tse <yangsita@gmail.com> | 2009-12-16 19:55:35 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2009-12-16 19:55:35 +0000 |
commit | 002ed5f29800282b16c2d9df8480aa7386c93dea (patch) | |
tree | 37ad2d891cb37bbb9c796f9eb35b7f2055ca2c32 /tests/ftp.pm | |
parent | 044ba6dad2cb0d891baf40ddcd611a4b9aca3921 (diff) | |
download | curl-002ed5f29800282b16c2d9df8480aa7386c93dea.tar.gz |
Test harness process control enhancements
Diffstat (limited to 'tests/ftp.pm')
-rw-r--r-- | tests/ftp.pm | 6 |
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+)$/) { |