mirror of
git://git.proxmox.com/git/pve-common.git
synced 2024-12-24 01:33:48 +03:00
Daemon: correctly set got_hup_signal flag (before we call terminate)
This commit is contained in:
parent
6105a115c6
commit
93710700b9
@ -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 $@;
|
||||
|
Loading…
Reference in New Issue
Block a user