mirror of https://gitee.com/openkylin/libvirt.git
Fix shutdown of LXC controller
Since we are not yet using the virNetServerPtr object for running the event loop, we can't use virNetServerQuit(). Instead set the global 'quit' flag in libvirt_lxc
This commit is contained in:
parent
7ea1dd93aa
commit
97d7f02dcc
|
@ -852,8 +852,11 @@ static void virLXCControllerSignalChildIO(virNetServerPtr server ATTRIBUTE_UNUSE
|
|||
int ret;
|
||||
|
||||
ret = waitpid(-1, NULL, WNOHANG);
|
||||
if (ret == ctrl->initpid)
|
||||
virNetServerQuit(ctrl->server);
|
||||
if (ret == ctrl->initpid) {
|
||||
virMutexLock(&lock);
|
||||
quit = true;
|
||||
virMutexUnlock(&lock);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue