From db91ec3a80296b9c11490f6201cebf189959730a Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Mon, 28 Apr 2008 13:47:20 +0000 Subject: [PATCH] -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 --- xCAT-server-2.0/sbin/xcatd | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xCAT-server-2.0/sbin/xcatd b/xCAT-server-2.0/sbin/xcatd index 9aba18eb6..3b719a530 100755 --- a/xCAT-server-2.0/sbin/xcatd +++ b/xCAT-server-2.0/sbin/xcatd @@ -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; }