From 97d7f02dcc4848f5f7a64ecd5b32c9beffb7f359 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Mon, 9 Jul 2012 14:55:31 +0100 Subject: [PATCH] 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 --- 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 a4874ea3e5..7a1ce140d1 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); + } }