mirror of
git://github.com/lxc/lxc
synced 2025-08-31 05:09:37 +00:00
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 <dwight.engen@oracle.com> Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
committed by
Stéphane Graber
parent
4f43438c47
commit
f485f377a1
@@ -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;
|
||||||
|
Reference in New Issue
Block a user