From: Cédric Bosdonnat Date: Tue, 19 Jul 2016 14:23:25 +0000 (+0200) Subject: lxc: errors after the handshake won't be reported X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=8ee6a99e7c2b31e7f3cdeabf59e211854da26f5d;p=libvirt.git lxc: errors after the handshake won't be reported Any error happening after the hand shake in the lxc controller will not result in a failure as errors are checked during the handshake. Move the handshake after the last possible error. --- diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c index f55aadc7e7..825b4d40a7 100644 --- a/src/lxc/lxc_controller.c +++ b/src/lxc/lxc_controller.c @@ -2444,13 +2444,13 @@ virLXCControllerRun(virLXCControllerPtr ctrl) if (lxcControllerClearCapabilities() < 0) goto cleanup; - if (virLXCControllerDaemonHandshake(ctrl) < 0) - goto cleanup; - for (i = 0; i < ctrl->nconsoles; i++) if (virLXCControllerConsoleSetNonblocking(&(ctrl->consoles[i])) < 0) goto cleanup; + if (virLXCControllerDaemonHandshake(ctrl) < 0) + goto cleanup; + /* We must not hold open a dbus connection for life * of LXC instance, since dbus-daemon is limited to * only a few 100 connections by default