Commit f485f377 by Dwight Engen Committed by Stéphane Graber

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: 's avatarDwight Engen <dwight.engen@oracle.com> Acked-by: 's avatarSerge E. Hallyn <serge.hallyn@ubuntu.com>
parent 4f43438c
...@@ -207,6 +207,9 @@ extern int lxc_wait(const char *lxcname, const char *states, int timeout, const ...@@ -207,6 +207,9 @@ extern int lxc_wait(const char *lxcname, const char *states, int timeout, const
if (fillwaitedstates(states, s)) if (fillwaitedstates(states, s))
return -1; return -1;
if (lxc_monitord_spawn(lxcpath))
return -1;
fd = lxc_monitor_open(lxcpath); fd = lxc_monitor_open(lxcpath);
if (fd < 0) if (fd < 0)
return -1; return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment