From: Serge Hallyn Date: Mon, 13 Jan 2014 02:44:32 +0000 (-0600) Subject: usernsexec: don't fail if we can't open pty X-Git-Tag: lxc-1.0.0.beta2~57 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8d4b877a3fe342702a8ebde1655c173020442ada;p=thirdparty%2Flxc.git usernsexec: don't fail if we can't open pty 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 Acked-by: Stéphane Graber --- diff --git a/src/lxc/lxc_usernsexec.c b/src/lxc/lxc_usernsexec.c index 2351070fa..6da4d6404 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);