diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c index a4874ea3e57cf7fba6fba7b08ae0a69987b1fc2e..7a1ce140d1efb01a6a1175adec4635b40868ebc2 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); + } }