]> git.proxmox.com Git - pve-common.git/commitdiff
Daemon: catch finished worker earlier
authorDietmar Maurer <dietmar@proxmox.com>
Thu, 1 Jan 2015 13:59:04 +0000 (14:59 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 1 Jan 2015 13:59:04 +0000 (14:59 +0100)
Else we get zobies for 5 seconds at restart.

data/PVE/Daemon.pm

index bfab09d9e0248632a4eed254f1cf41869d4d125b..9ba05dc20949225d63fb49ad3e81058ae9f5cbcf 100644 (file)
@@ -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);