From 8754a7ee0c313e4bd23bebaef7f5b0b0f1863599 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Mon, 10 Jun 2013 14:43:50 +0000 Subject: [PATCH] Avoid reapers trouncing $! for other system calls git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@16598 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/sbin/xcatd | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xCAT-server/sbin/xcatd b/xCAT-server/sbin/xcatd index f4788223e..0aaae342a 100755 --- a/xCAT-server/sbin/xcatd +++ b/xCAT-server/sbin/xcatd @@ -721,6 +721,7 @@ $dbmaster=xCAT::Table::init_dbworker; my $CHILDPID=0; #Global for reapers my %immediatechildren; sub generic_reaper { + local($!); while (($CHILDPID=waitpid(-1,WNOHANG)) > 0) { yield; } @@ -728,6 +729,7 @@ sub generic_reaper { } sub ssl_reaper { + local($!); while (($CHILDPID=waitpid(-1,WNOHANG)) > 0) { if ($immediatechildren{$CHILDPID}) { delete $immediatechildren{$CHILDPID}; @@ -738,6 +740,7 @@ sub ssl_reaper { } sub dispatch_reaper { + local($!); while (($CHILDPID =waitpid(-1, WNOHANG)) > 0) { if ($dispatched_children{$CHILDPID}) { delete $dispatched_children{$CHILDPID}; @@ -748,6 +751,7 @@ sub dispatch_reaper { } sub plugin_reaper { + local($!); while (($CHILDPID = waitpid(-1, WNOHANG)) > 0) { if ($plugin_children{$CHILDPID}) { delete $plugin_children{$CHILDPID};