[lxc-devel] [PATCH] utmp.h: Don't fail when utmpx.h isn't present

Stéphane Graber stgraber at ubuntu.com
Thu Jan 10 22:15:38 UTC 2013


On 01/10/2013 05:13 PM, Stéphane Graber wrote:
> Following a comment on the mailing-list, I made utmp.h return -1
> when it's disabled, the problem with that is that it prevents the
> container from starting completely, which isn't quite what I wanted.
> 
> This change makes the function succeed, the container will therefore
> start but without utmp handler.
> 
> Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
> ---
>  src/lxc/utmp.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/lxc/utmp.h b/src/lxc/utmp.h
> index 1bd7c23..ad4a8ab 100644
> --- a/src/lxc/utmp.h
> +++ b/src/lxc/utmp.h
> @@ -32,6 +32,6 @@ int lxc_utmp_mainloop_add(struct lxc_epoll_descr *descr,
>  #else
>  static inline int lxc_utmp_mainloop_add(struct lxc_epoll_descr *descr,
>  			  struct lxc_handler *handler) {
> -		return -1;
> +		return 0;
>  }
>  #endif
> 

When discussing this with Serge, it's been agreed that this behaviour
isn't ideal (though it's better than what's currently in staging).

I'm now working on writing compatibility code for utmpx.h on bionic, so
hopefully I can drop those ifdefs soon and just fallback to lxc's own
implementation of utmpx.h instead.

-- 
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: 901 bytes
Desc: OpenPGP digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20130110/36a2eaba/attachment.pgp>


More information about the lxc-devel mailing list