mirror of
https://github.com/curl/curl.git
synced 2026-08-03 03:30:27 +03:00
basic signal handler for sigint and sigkill
This commit is contained in:
parent
967ec296c0
commit
85f9e6c4b9
1 changed files with 9 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue