From ce0ae1edec5f7c6e818077ebdd76694e7541520a Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Thu, 1 Jan 2015 14:59:04 +0100 Subject: [PATCH] Daemon: catch finished worker earlier Else we get zobies for 5 seconds at restart. --- data/PVE/Daemon.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/data/PVE/Daemon.pm b/data/PVE/Daemon.pm index bfab09d..9ba05dc 100644 --- a/data/PVE/Daemon.pm +++ b/data/PVE/Daemon.pm @@ -335,7 +335,11 @@ my $server_run = sub { &$old_sig_chld(@_) if $old_sig_chld; }; - for (;;) { # forever + # catch worker finished during restart phase + &$finish_workers($self); + + # now loop forever (until we receive terminate signal) + for (;;) { &$start_workers($self); sleep(5); &$finish_workers($self); -- 2.39.2