-Fix problem where xCATd server could occasionally hang while fulfilling a command

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1213 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2008-04-28 13:47:20 +00:00
parent 6519ec52de
commit db91ec3a80

View File

@ -14,7 +14,7 @@ use xCAT::Client submit_request;
my $clientselect = new IO::Select;
sub xexit {
while (wait() != -1) {
while (wait() > 0) {
yield;
}
exit @_;
@ -388,7 +388,9 @@ unless ($foreground) {
my $CHILDPID=0; #Global for reapers
sub generic_reaper {
while (waitpid(-1,WNOHANG > 0)) {}
while (waitpid(-1,WNOHANG) > 0) {
yield;
}
$SIG{CHLD} = \&generic_reaper;
}