summaryrefslogtreecommitdiff
path: root/tests/ftp.pm
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-12-23 15:20:20 +0000
committerYang Tse <yangsita@gmail.com>2009-12-23 15:20:20 +0000
commitc74875d94e9fee0c3778ea4d3896961ceab16a53 (patch)
tree8d62ddb6386bbee462efbeb4da1e512be88855a4 /tests/ftp.pm
parent271dc9c5821d05c454936a0b8acad5aa0a09c8a7 (diff)
downloadcurl-c74875d94e9fee0c3778ea4d3896961ceab16a53.tar.gz
Back out some pingpong server stopping changes introduced last week in
order to re-use 'classic' stopping and allow taking test-suite run time references from this state.
Diffstat (limited to 'tests/ftp.pm')
-rw-r--r--tests/ftp.pm26
1 files changed, 6 insertions, 20 deletions
diff --git a/tests/ftp.pm b/tests/ftp.pm
index d19d0c70f..10ad79eda 100644
--- a/tests/ftp.pm
+++ b/tests/ftp.pm
@@ -170,8 +170,6 @@ sub killpid {
sub ftpkillslave {
my ($id, $ext, $verbose)=@_;
my $base;
- my $pidlist;
- my @pidfiles;
for $base (('filt', 'data')) {
my $f = ".sock$base$id$ext.pid";
@@ -179,15 +177,10 @@ sub ftpkillslave {
if($pid > 0) {
printf ("* kill pid for %s => %d\n", "ftp-$base$id$ext", $pid)
if($verbose);
- $pidlist .= "$pid ";
+ kill (9, $pid);
+ waitpid($pid, 0);
}
- push @pidfiles, $f;
- }
-
- killpid($verbose, $pidlist);
-
- foreach my $pidfile (@pidfiles) {
- unlink($pidfile);
+ unlink($f);
}
}
@@ -197,8 +190,6 @@ sub ftpkillslave {
#
sub ftpkillslaves {
my ($verbose) = @_;
- my $pidlist;
- my @pidfiles;
for $ext (('', 'ipv6')) {
for $id (('', '2')) {
@@ -208,18 +199,13 @@ sub ftpkillslaves {
if($pid > 0) {
printf ("* kill pid for %s => %d\n", "ftp-$base$id$ext",
$pid) if($verbose);
- $pidlist .= "$pid ";
+ kill (9, $pid);
+ waitpid($pid, 0);
}
- push @pidfiles, $f;
+ unlink($f);
}
}
}
-
- killpid($verbose, $pidlist);
-
- foreach my $pidfile (@pidfiles) {
- unlink($pidfile);
- }
}