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
This commit is contained in:
parent
193bea48f6
commit
8754a7ee0c
@ -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};
|
||||
|
Loading…
Reference in New Issue
Block a user