From 491bf3682ea2f78d4c72a6d8fa96b72a80b50e22 Mon Sep 17 00:00:00 2001 From: XuWei Date: Fri, 25 Aug 2017 05:17:49 -0400 Subject: [PATCH] Fix a bug that if children process over 32, sleep 1 second --- xCAT-server/lib/xcat/plugins/bmcdiscover.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/bmcdiscover.pm b/xCAT-server/lib/xcat/plugins/bmcdiscover.pm index b0ebd90c8..af01fb47b 100644 --- a/xCAT-server/lib/xcat/plugins/bmcdiscover.pm +++ b/xCAT-server/lib/xcat/plugins/bmcdiscover.pm @@ -686,9 +686,9 @@ sub scan_process { $pipe_map{$child} = $cfd; } - do { + while ($children >= 32) { sleep(1); - } until ($children < 32); + } } while($children > 0) { sleep(1);