]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
usernsexec: don't fail if we can't open pty
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Mon, 13 Jan 2014 02:44:32 +0000 (20:44 -0600)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Mon, 13 Jan 2014 15:02:24 +0000 (09:02 -0600)
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@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/lxc_usernsexec.c

index 2351070fa8306adcad477f820a7346d5d949730f..6da4d6404195a6e99dd4528271a90962fe5e40b9 100644 (file)
@@ -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);