mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-06-17 13:55:50 +00:00
API/clone: do not overwrite global signal handlers
perls 'local' must be either used in front of each $SIG{...} assignments or they must be put in a list, else it affects only the first variable and the rest are *not* in local context. This may cause weird behaviour where daemons seemingly do not get terminating signals delivered correctly and thus may not shutdown gracefully anymore. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
edd48c325a
commit
eaae66be9f
@ -2532,7 +2532,10 @@ __PACKAGE__->register_method({
|
|||||||
my $jobs = {};
|
my $jobs = {};
|
||||||
|
|
||||||
eval {
|
eval {
|
||||||
local $SIG{INT} = $SIG{TERM} = $SIG{QUIT} = $SIG{HUP} = sub { die "interrupted by signal\n"; };
|
local $SIG{INT} =
|
||||||
|
local $SIG{TERM} =
|
||||||
|
local $SIG{QUIT} =
|
||||||
|
local $SIG{HUP} = sub { die "interrupted by signal\n"; };
|
||||||
|
|
||||||
PVE::Storage::activate_volumes($storecfg, $vollist, $snapname);
|
PVE::Storage::activate_volumes($storecfg, $vollist, $snapname);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user