5
0
mirror of git://git.proxmox.com/git/pve-common.git synced 2024-12-25 05:33:49 +03:00

Daemon: correctly set got_hup_signal flag (before we call terminate)

This commit is contained in:
Dietmar Maurer 2015-01-01 10:57:10 +01:00
parent 6105a115c6
commit 93710700b9

View File

@ -299,9 +299,9 @@ my $server_run = sub {
$SIG{HUP} = sub {
local ($@, $!, $?); # do not overwrite error vars
syslog('info', "received signal HUP");
$self->{got_hup_signal} = 1;
if ($self->{max_workers}) {
&$terminate_server($self);
$self->{got_hup_signal} = 1;
} elsif ($self->can('hup')) {
eval { $self->hup() };
warn $@ if $@;