]> git.proxmox.com Git - pve-common.git/commitdiff
Daemon: correctly set got_hup_signal flag (before we call terminate)
authorDietmar Maurer <dietmar@proxmox.com>
Thu, 1 Jan 2015 09:57:10 +0000 (10:57 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 1 Jan 2015 09:57:10 +0000 (10:57 +0100)
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 $@;