Commit f6144ed4 by Serge Hallyn Committed by Stéphane Graber

api shutdown: don't c->stop() if already stopped.

parent 5a339bbb
...@@ -655,7 +655,7 @@ static bool lxcapi_shutdown(struct lxc_container *c, int timeout) ...@@ -655,7 +655,7 @@ static bool lxcapi_shutdown(struct lxc_container *c, int timeout)
return true; return true;
kill(pid, SIGPWR); kill(pid, SIGPWR);
retv = c->wait(c, "STOPPED", timeout); retv = c->wait(c, "STOPPED", timeout);
if (timeout > 0) { if (!retv && timeout > 0) {
c->stop(c); c->stop(c);
retv = c->wait(c, "STOPPED", 0); // 0 means don't wait retv = c->wait(c, "STOPPED", 0); // 0 means don't wait
} }
......
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