-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
This commit is contained in:
jbjohnso 2008-05-02 20:15:27 +00:00
parent 82fd039e18
commit 5677d58fad

View File

@ -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