]> git.proxmox.com Git - pve-common.git/commitdiff
daemon: fix send termination to all workers on exit
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 17 Nov 2017 13:05:48 +0000 (14:05 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 20 Nov 2017 12:54:27 +0000 (13:54 +0100)
The hash slice did not work as intented here, it only return the keys
from the last elemend defined in the slice, thus not all workers got
a TERM.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/Daemon.pm

index 9e03c801db014f617c58c6f0216bbedd233c44f0..dcc4d340eef8b3c1cad36f9f224b79c9cbfca8ea 100644 (file)
@@ -201,7 +201,7 @@ my $terminate_server = sub {
     return if $allow_open_children && $self->{leave_children_open_on_reload};
 
     # else send TERM to all (old and current) child workers
-    kill 15, keys %{$self->@{'workers','old_workers'}};
+    kill 15, (keys %{$self->{workers}}, keys %{$self->{old_workers}});
 
     # nicely shutdown childs (give them max 10 seconds to shut down)
     my $previous_alarm = alarm(10);