[libvirt] [PATCH] Fix shutdown of LXC controller
Daniel P. Berrange
berrange at redhat.com
Mon Jul 9 13:56:14 UTC 2012
From: "Daniel P. Berrange" <berrange at redhat.com>
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
---
src/lxc/lxc_controller.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
index a4874ea..7a1ce14 100644
--- a/src/lxc/lxc_controller.c
+++ b/src/lxc/lxc_controller.c
@@ -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);
+ }
}
--
1.7.10.4
More information about the libvir-list
mailing list