From 20b3960c09f54dfb3dcdf614d5d8644a0aed5c54 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Mon, 10 Jun 2013 14:42:25 +0000 Subject: [PATCH] Prevent child reapers from trouncing accurate syscall errno settings git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16597 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 e2cb594e3..4140dee55 100755 --- a/xCAT-server/sbin/xcatd +++ b/xCAT-server/sbin/xcatd @@ -823,6 +823,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; } @@ -830,6 +831,7 @@ sub generic_reaper { } sub ssl_reaper { + local($!); my $numdone = 0; while (($CHILDPID=waitpid(-1,WNOHANG)) > 0) { if ($immediatechildren{$CHILDPID}) { @@ -843,6 +845,7 @@ sub ssl_reaper { } sub dispatch_reaper { + local($!); while (($CHILDPID =waitpid(-1, WNOHANG)) > 0) { if ($dispatched_children{$CHILDPID}) { delete $dispatched_children{$CHILDPID}; @@ -853,6 +856,7 @@ sub dispatch_reaper { } sub plugin_reaper { + local($!); while (($CHILDPID = waitpid(-1, WNOHANG)) > 0) { if ($plugin_children{$CHILDPID}) { delete $plugin_children{$CHILDPID};