stas 2003/09/11 19:47:41
Modified: perl-framework/Apache-Test/lib/Apache TestSmoke.pm
Log:
make sure that the server is killed if interrupted in the middle
Revision Changes Path
1.23 +7 -1
httpd-test/perl-framework/Apache-Test/lib/Apache/TestSmoke.pm
Index: TestSmoke.pm
===================================================================
RCS file:
/home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestSmoke.pm,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -u -r1.22 -r1.23
--- TestSmoke.pm 12 Sep 2003 02:25:52 -0000 1.22
+++ TestSmoke.pm 12 Sep 2003 02:47:41 -0000 1.23
@@ -170,6 +170,9 @@
my $self = shift;
$SIG{INT} = sub {
+ # make sure that there the server is down
+ $self->kill_proc();
+
$self->report_finish;
exit;
};
@@ -739,11 +742,14 @@
my($self) = @_;
# a hack
- my $file = "t/logs/httpd.pid";
+ my $t_logs = $self->{test_config}->{vars}->{t_logs};
+ my $file = catfile $t_logs, "httpd.pid";
return unless -f $file;
+
my $pid = `cat $file`;
chomp $pid;
return unless $pid;
+
kill SIGINT => $pid;
}