5
0
mirror of git://git.proxmox.com/git/pve-zsync.git synced 2025-03-11 20:58:42 +03:00

improve signal handler, print error

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2019-03-07 09:46:57 +01:00
parent 4fec932c7d
commit 61ed255c3a

View File

@ -54,10 +54,9 @@ if (defined($command) && $command ne 'help' && $command ne 'printpod') {
check_bin ('scp');
}
$SIG{TERM} = $SIG{QUIT} = $SIG{PIPE} = $SIG{HUP} = $SIG{KILL} = $SIG{INT} =
sub {
die "Signal aborting sync\n";
};
$SIG{TERM} = $SIG{QUIT} = $SIG{PIPE} = $SIG{HUP} = $SIG{KILL} = $SIG{INT} = sub {
die "Signaled, aborting sync: $!\n";
};
sub check_bin {
my ($bin) = @_;