From 8d4b877a3fe342702a8ebde1655c173020442ada Mon Sep 17 00:00:00 2001 From: Serge Hallyn Date: Sun, 12 Jan 2014 20:44:32 -0600 Subject: [PATCH] usernsexec: don't fail if we can't open pty MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- 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 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); -- 2.47.2