mirror of
https://git.proxmox.com/git/pve-common
synced 2025-08-14 13:20:48 +00: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 {
|
$SIG{HUP} = sub {
|
||||||
local ($@, $!, $?); # do not overwrite error vars
|
local ($@, $!, $?); # do not overwrite error vars
|
||||||
syslog('info', "received signal HUP");
|
syslog('info', "received signal HUP");
|
||||||
|
$self->{got_hup_signal} = 1;
|
||||||
if ($self->{max_workers}) {
|
if ($self->{max_workers}) {
|
||||||
&$terminate_server($self);
|
&$terminate_server($self);
|
||||||
$self->{got_hup_signal} = 1;
|
|
||||||
} elsif ($self->can('hup')) {
|
} elsif ($self->can('hup')) {
|
||||||
eval { $self->hup() };
|
eval { $self->hup() };
|
||||||
warn $@ if $@;
|
warn $@ if $@;
|
||||||
|
Loading…
Reference in New Issue
Block a user