Skip to content
Snippets Groups Projects
Commit 85f9e6c4 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

basic signal handler for sigint and sigkill

parent 967ec296
No related branches found
No related tags found
No related merge requests found
......@@ -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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment