[lxc-devel] [PATCH 1/2] usernsexec: don't fail if we can't open pty
Stéphane Graber
stgraber at ubuntu.com
Mon Jan 13 02:47:59 UTC 2014
On Sun, Jan 12, 2014 at 08:44:32PM -0600, Serge Hallyn wrote:
> It's nice if we can do it, but not required. Exiting on this
> failure causes lxc-create started by root as a less-privileged
> userid to fail.
>
> Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>
> ---
> src/lxc/lxc_usernsexec.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/src/lxc/lxc_usernsexec.c b/src/lxc/lxc_usernsexec.c
> index f152f91..98a353a 100644
> --- a/src/lxc/lxc_usernsexec.c
> +++ b/src/lxc/lxc_usernsexec.c
> @@ -76,9 +76,8 @@ static void opentty(const char * tty) {
>
> fd = open(tty, O_RDWR | O_NONBLOCK);
> if (fd == -1) {
> - printf("FATAL: can't reopen tty: %s", strerror(errno));
> - sleep(1);
> - exit(1);
> + printf("WARN: could not reopen tty: %s", strerror(errno));
> + return;
> }
>
> flags = fcntl(fd, F_GETFL);
> --
> 1.8.5.2
>
> _______________________________________________
> 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: 836 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20140112/df6867bb/attachment.pgp>
More information about the lxc-devel
mailing list