[lxc-devel] [PATCH] lxc-init: continue even if we fail to mount /dev/mqueue

Serge Hallyn serge.hallyn at ubuntu.com
Wed Jun 12 12:56:03 UTC 2013


Quoting Natanael Copa (ncopa at alpinelinux.org):
> The 'lxc-init' (a lightweight init process used by lxc-execute in place
> of upstart etc) tries to mount /dev/mqueue during startup. If that fails
> (for instance due to missing support for mqueue in kernel) then it
> aborts execution and returns -1. This is unreasonable as very few
> applications actually need /dev/mqueue.
> 
> This similar to what we do with /dev/shm.
> 
> Signed-off-by: Natanael Copa <ncopa at alpinelinux.org>

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

> ---
>  src/lxc/utils.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/lxc/utils.c b/src/lxc/utils.c
> index 6c0f9d0..136f943 100644
> --- a/src/lxc/utils.c
> +++ b/src/lxc/utils.c
> @@ -148,8 +148,9 @@ extern int lxc_setup_fs(void)
>  		return 0;
>  	}
>  
> +	/* continue even without posix message queue support */
>  	if (mount_fs("mqueue", "/dev/mqueue", "mqueue"))
> -		return -1;
> +		INFO("failed to mount /dev/mqueue");
>  
>  	return 0;
>  }
> -- 
> 1.8.3.1
> 
> 
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
> 
> Build for Windows Store.
> 
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> Lxc-devel mailing list
> Lxc-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-devel




More information about the lxc-devel mailing list