From 5677d58fad6468f6952794460083775770fe6f70 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 2 May 2008 20:15:27 +0000 Subject: [PATCH] -Fix problem where psh would ocassionally hang when child processes have all exited git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1261 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-client-2.0/bin/psh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xCAT-client-2.0/bin/psh b/xCAT-client-2.0/bin/psh index 333fc29dc..a0496943e 100755 --- a/xCAT-client-2.0/bin/psh +++ b/xCAT-client-2.0/bin/psh @@ -101,10 +101,11 @@ foreach (@nodes) { $inputs->add($child); $nodehdl{$child} = $node; } -while ($children) { +while ($inputs->count and $children) { processoutput($inputs); } while (processoutput($inputs)) {}; +wait; exit(0); sub processoutput { #This way, one arbiter handles output, no interrupting