From: Dietmar Maurer Date: Thu, 1 Jan 2015 09:57:10 +0000 (+0100) Subject: Daemon: correctly set got_hup_signal flag (before we call terminate) X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=commitdiff_plain;h=93710700b90cd62b0e9bd2d8c6771ecbb0626303;hp=6105a115c6d64ea577a214ef9a62a7818a4a00ce Daemon: correctly set got_hup_signal flag (before we call terminate) --- diff --git a/data/PVE/Daemon.pm b/data/PVE/Daemon.pm index 1436f17..448f881 100644 --- a/data/PVE/Daemon.pm +++ b/data/PVE/Daemon.pm @@ -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 $@;