From 93710700b90cd62b0e9bd2d8c6771ecbb0626303 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Thu, 1 Jan 2015 10:57:10 +0100 Subject: [PATCH] Daemon: correctly set got_hup_signal flag (before we call terminate) --- data/PVE/Daemon.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 $@; -- 2.39.2