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 <dwight.en...@oracle.com>
---
 src/lxc/state.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/lxc/state.c b/src/lxc/state.c
index 4ab131a..68ec00b 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;
-- 
1.8.1.4


------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel

Reply via email to