[lxc-devel] [PATCH] Fix the timeout == 0 case in lxcapi_shutdown()
Stéphane Graber
stgraber at ubuntu.com
Fri Jan 31 11:47:49 UTC 2014
On Fri, Jan 31, 2014 at 11:47:02AM +0100, Robert Vogelgesang wrote:
> 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>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>
>
> 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);
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel
--
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20140131/3637445d/attachment.pgp>
More information about the lxc-devel
mailing list