[Ovirt-devel] [PATCH] Fix bug in host-status.
Ian Main
imain at redhat.com
Tue Jul 22 17:19:27 UTC 2008
This patch fixes a bug in host-status that can cause it to backtrace and die.
If the number of processes forked was low enough it would wait for a process that
was never fork'd and die.
Signed-off-by: Ian Main <imain at redhat.com>
---
wui/src/host-status/host-status.rb | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/wui/src/host-status/host-status.rb b/wui/src/host-status/host-status.rb
index 7908da7..d28f46f 100755
--- a/wui/src/host-status/host-status.rb
+++ b/wui/src/host-status/host-status.rb
@@ -210,6 +210,11 @@ loop do
p_count += 1
+ fork do
+ check_status(host)
+ exit 0
+ end
+
# Only allow up to n_hosts / 5 processes running at a time. If we go above this
# Then we wait for one to exit before continuing. This guarantees it will take
# at most 5 timeouts to check all hosts.
@@ -218,11 +223,6 @@ loop do
p_count -= 1
end
- fork do
- check_status(host)
- exit 0
- end
-
end
while p_count > 0
--
1.5.5.1
More information about the ovirt-devel
mailing list