From: Daniel Stenberg Date: Thu, 28 Apr 2005 21:06:17 +0000 (+0000) Subject: basic signal handler for sigint and sigkill X-Git-Tag: curl-7_14_0~91 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=85f9e6c4b9ada950887e74fb2eab234915d53c1e;p=curl basic signal handler for sigint and sigkill --- 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 {