projects
/
pve-common.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f3a3399
)
Daemon: catch finished worker earlier
author
Dietmar Maurer
<dietmar@proxmox.com>
Thu, 1 Jan 2015 13:59:04 +0000
(14:59 +0100)
committer
Dietmar 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
patch
|
blob
|
blame
|
history
diff --git
a/data/PVE/Daemon.pm
b/data/PVE/Daemon.pm
index bfab09d9e0248632a4eed254f1cf41869d4d125b..9ba05dc20949225d63fb49ad3e81058ae9f5cbcf 100644
(file)
--- 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;
};
&$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);
&$start_workers($self);
sleep(5);
&$finish_workers($self);