2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-30 09:36:41 +00:00

Wait the completion of UDP process to avoid of DB Magic error

close-issue: #1008
This commit is contained in:
chenglch 2016-06-21 04:41:56 -04:00
parent 6612ffca3e
commit b57db4ef31

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;