[lxc-devel] [PATCH] lxc_autostart: Update following shutdown() API change

Serge Hallyn serge.hallyn at ubuntu.com
Fri Feb 7 15:40:45 UTC 2014


Quoting Stéphane Graber (stgraber at ubuntu.com):
> Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>

Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>

> ---
>  src/lxc/lxc_autostart.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/src/lxc/lxc_autostart.c b/src/lxc/lxc_autostart.c
> index ed62294..cfb24d0 100644
> --- a/src/lxc/lxc_autostart.c
> +++ b/src/lxc/lxc_autostart.c
> @@ -280,8 +280,11 @@ int main(int argc, char *argv[])
>  				if (my_args.list)
>  					printf("%s\n", c->name);
>  				else {
> -					if (!c->shutdown(c, my_args.timeout))
> -						fprintf(stderr, "Error shutting down container: %s\n", c->name);
> +					if (!c->shutdown(c, my_args.timeout)) {
> +						if (!c->stop(c)) {
> +							fprintf(stderr, "Error shutting down container: %s\n", c->name);
> +						}
> +					}
>  				}
>  			}
>  		}
> -- 
> 1.9.rc1
> 
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel


More information about the lxc-devel mailing list