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

Add signal handling when we sync.

This gives the capability to clean up, if a error occurs.
This commit is contained in:
Wolfgang Link 2016-08-02 12:24:50 +02:00 committed by Dietmar Maurer
parent adede52a99
commit 7f5254ba32

View File

@ -51,6 +51,11 @@ check_bin ('zfs');
check_bin ('ssh');
check_bin ('scp');
$SIG{TERM} = $SIG{QUIT} = $SIG{PIPE} = $SIG{HUP} = $SIG{KILL} = $SIG{INT} =
sub {
die "Signal aborting sync\n";
};
sub check_bin {
my ($bin) = @_;