mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-07-10 06:41:31 +00:00
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
This commit is contained in:
@ -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};
|
||||
|
Reference in New Issue
Block a user