summaryrefslogtreecommitdiff
path: root/tests/ftp.pm
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-12-16 19:55:35 +0000
committerYang Tse <yangsita@gmail.com>2009-12-16 19:55:35 +0000
commit002ed5f29800282b16c2d9df8480aa7386c93dea (patch)
tree37ad2d891cb37bbb9c796f9eb35b7f2055ca2c32 /tests/ftp.pm
parent044ba6dad2cb0d891baf40ddcd611a4b9aca3921 (diff)
downloadcurl-002ed5f29800282b16c2d9df8480aa7386c93dea.tar.gz
Test harness process control enhancements
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+)$/) {