diff --git a/xCAT-client/bin/psh b/xCAT-client/bin/psh index ccb93e13d..ff3e903e4 100755 --- a/xCAT-client/bin/psh +++ b/xCAT-client/bin/psh @@ -120,11 +120,13 @@ foreach (@nodes) { $inputs->add($child); $nodehdl{$child} = $node; } -while ($inputs->count and $children) { +while ($inputs->count) { processoutput($inputs); } while (processoutput($inputs)) {}; -wait; +while (wait != -1) { + yield; +} my $exitcode=0; foreach (values %pids) { my $possible_codes = join ",",keys %foundcodes;