From: Christian Brauner Date: Sat, 31 Jul 2021 08:19:57 +0000 (+0200) Subject: terminal: fail on unknown error during TIOCGPTPEER X-Git-Tag: lxc-5.0.0~126^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64ac925fb1b0adceebfa9ac80faadae31c72e6cc;p=thirdparty%2Flxc.git terminal: fail on unknown error during TIOCGPTPEER Signed-off-by: Christian Brauner --- diff --git a/src/lxc/terminal.c b/src/lxc/terminal.c index dcdb51df5..cdb44956c 100644 --- a/src/lxc/terminal.c +++ b/src/lxc/terminal.c @@ -944,9 +944,10 @@ int lxc_devpts_terminal(int devpts_fd, int *ret_ptx, int *ret_pty, break; default: SYSWARN("Failed to allocate new pty device"); - break; + return -errno; } + /* The caller tells us that they trust the devpts instance. */ if (require_tiocgptpeer) return ret_errno(ENODEV); }