Wrap unlikely scenario in eval to hopefully keep DB worker up in the face of some nebulous problem

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13139 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2012-06-21 15:19:06 +00:00
parent 1fdee03579
commit 65f12a5022

View File

@ -216,9 +216,10 @@ sub init_dbworker {
};
if ($@) { #this should never be reached, but leave it intact just in case
my $err=$@;
xCAT::MsgUtils->message("S","xcatd: possible BUG encountered by xCAT DB worker ".$err);
eval { xCAT::MsgUtils->message("S","xcatd: possible BUG encountered by xCAT DB worker ".$err); };
}
if ($intendedpid != $$) { #avoid redundant fork
eval { xCAT::MsgUtils->message("S","Pid $$ shutting itself down because only pid $intendedpid is permitted to be in this area"); };
exit(0);
}
}