[lxc-devel] [PATCH] Fix the timeout == 0 case in lxcapi_shutdown()
Robert Vogelgesang
vogel at users.sourceforge.net
Fri Jan 31 10:47:02 UTC 2014
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 at users.sourceforge.net>
diff -up lxc-lxc-1.0.0.beta3/src/lxc/lxccontainer.c.orig lxc-lxc-1.0.0.beta3/src/lxc/lxccontainer.c
--- lxc-lxc-1.0.0.beta3/src/lxc/lxccontainer.c.orig 2014-01-27 14:52:20.000000000 +0100
+++ lxc-lxc-1.0.0.beta3/src/lxc/lxccontainer.c 2014-01-31 11:09:17.976688810 +0100
@@ -1338,8 +1338,6 @@ static bool lxcapi_shutdown(struct lxc_c
if (!c)
return false;
- if (!timeout)
- timeout = -1;
if (!c->is_running(c))
return true;
pid = c->init_pid(c);
More information about the lxc-devel
mailing list