aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-04-28 21:06:17 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-04-28 21:06:17 +0000
commit85f9e6c4b9ada950887e74fb2eab234915d53c1e (patch)
tree32631c669fe7246b4f7c9fd1c5ce2b6995906b34 /tests
parent967ec296c036b6ce45e03a6e7b7116876c01a878 (diff)
basic signal handler for sigint and sigkill
Diffstat (limited to 'tests')
-rw-r--r--tests/ftpserver.pl9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl
index a3837f934..6c8969745 100644
--- a/tests/ftpserver.pl
+++ b/tests/ftpserver.pl
@@ -99,6 +99,15 @@ do {
}
} while(shift @ARGV);
+sub catch_zap {
+ my $signame = shift;
+ print STDERR "ftpserver.pl received SIG$signame, exiting\n";
+ ftpkillslaves(1);
+ die "Somebody sent me a SIG$signame";
+}
+$SIG{INT} = \&catch_zap;
+$SIG{KILL} = \&catch_zap;
+
my $sfpid;
sub startsf {