[libvirt] [PATCH] Fix shutdown of LXC controller

From: "Daniel P. Berrange" <berrange@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

On 07/09/2012 07:56 AM, Daniel P. Berrange wrote:
From: "Daniel P. Berrange" <berrange@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(-)
ACK. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (2)
-
Daniel P. Berrange
-
Eric Blake