Commit fef9aa89 by Serge Hallyn

do_lxcap_stop: wait until container is stopped

In the past, lxc-cmd-stop would wait until the command pipe was closed before returning, ensuring that the container monitor had exited. Now that we accept the actual success return value, lxcapi_stop can return success before the monitor has fully exited. So explicitly wait for the container to stop, when lxc-cmd-stop returned success. Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
parent 69f97e3c
......@@ -852,7 +852,10 @@ static bool do_lxcapi_stop(struct lxc_container *c)
ret = lxc_cmd_stop(c->name, c->config_path);
return ret == 0;
if (ret == 0)
return do_lxcapi_wait(c, "STOPPED", 10);
return false;
}
WRAP_API(bool, lxcapi_stop)
......
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