[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]