mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-14 13:31:27 +00:00
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: Robert Vogelgesang <vogel@users.sourceforge.net> Acked-by: Stéphane Graber <stgraber@ubuntu.com>
This commit is contained in:
parent
a17b1e65fa
commit
a52e315d12
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user