2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-31 01:56:39 +00:00

Merge pull request #1352 from chenglch/xcatd_db

Wait the completion of UDP process to avoid of DB Magic error
This commit is contained in:
Xiaopeng Wang 2016-06-22 07:50:11 +08:00 committed by GitHub
commit 1efb3d10ab

View File

@ -1469,10 +1469,12 @@ if (open($mainpidfile,"<","/var/run/xcat/mainservice.pid")) {
}
if ($listener) { $listener->close; }
my $lastpid;
while (keys %immediatechildren) {
while (keys %immediatechildren || $pid_UDP) {
$lastpid=wait();
if ($immediatechildren{$lastpid}) {
delete $immediatechildren{$lastpid};
} elsif ($lastpid == $pid_UDP) {
$pid_UDP = 0;
}
}
xCAT::Table::shut_dbworker;