From f485f377a1caba11c58da100d3db9a8c6fdeb7d5 Mon Sep 17 00:00:00 2001 From: Dwight Engen Date: Thu, 25 Apr 2013 12:21:53 -0400 Subject: [PATCH] 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 --- src/lxc/state.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.47.2