Fix problem where an xcatd instance consumes lots of processor time while shutting down

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9925 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2011-06-24 13:59:30 +00:00
parent c07ff6d771
commit ec291f8fc9

View File

@ -811,7 +811,13 @@ if ($inet6support) {
close($mainpidfile);
}
if ($listener) { $listener->close; }
while (keys %immediatechildren) { yield(); }
my $lastpid;
while (keys %immediatechildren) {
$lastpid=wait();
if ($immediatechildren{$lastpid}) {
delete $immediatechildren{$lastpid};
}
}
xCAT::Table::shut_dbworker;
if ($dbmaster) {
kill 2, $dbmaster;