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: Serge Hallyn <serge.hallyn@ubuntu.com>
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)