]> git.proxmox.com Git - pve-common.git/blobdiff - data/PVE/Daemon.pm
Daemon: correctly set got_hup_signal flag (before we call terminate)
[pve-common.git] / data / PVE / Daemon.pm
index 1436f17bafb06cdf4defea3682331a035590c153..448f881f9aa20a68bca71c638eaf463af4c08193 100644 (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 $@;