From: Dwight Engen Date: Thu, 25 Apr 2013 16:21:53 +0000 (-0400) Subject: lxc_wait should start monitord X-Git-Tag: lxc-1.0.0.alpha1~1^2~258 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f485f377a1caba11c58da100d3db9a8c6fdeb7d5;p=thirdparty%2Flxc.git lxc_wait should start monitord If lxc_wait is called before the container has started the socket will not yet have been created and lxc_wait's connect to it will fail. Starting the daemon will create the socket for lxc_wait to connect to. Signed-off-by: Dwight Engen Acked-by: Serge E. Hallyn --- diff --git a/src/lxc/state.c b/src/lxc/state.c index 4ab131a4c..68ec00ba0 100644 --- a/src/lxc/state.c +++ b/src/lxc/state.c @@ -207,6 +207,9 @@ extern int lxc_wait(const char *lxcname, const char *states, int timeout, const if (fillwaitedstates(states, s)) return -1; + if (lxc_monitord_spawn(lxcpath)) + return -1; + fd = lxc_monitor_open(lxcpath); if (fd < 0) return -1;