Commit a52e315d by Robert Vogelgesang Committed by Stéphane Graber

Fix the timeout == 0 case in lxcapi_shutdown()

The timeout argument should be handled as follows: -1 => Wait forever 0 => Don't wait > 0 => Wait for timeout seconds Without this patch, the 0 case is mapped to -1. Signed-off-by: 's avatarRobert Vogelgesang <vogel@users.sourceforge.net> Acked-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent a17b1e65
...@@ -1339,8 +1339,6 @@ static bool lxcapi_shutdown(struct lxc_container *c, int timeout) ...@@ -1339,8 +1339,6 @@ static bool lxcapi_shutdown(struct lxc_container *c, int timeout)
if (!c) if (!c)
return false; return false;
if (!timeout)
timeout = -1;
if (!c->is_running(c)) if (!c->is_running(c))
return true; return true;
pid = c->init_pid(c); pid = c->init_pid(c);
......
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