From d3893399703389e69da39bc01d76fa21e228bd80 Mon Sep 17 00:00:00 2001 From: "Andrey Jr. Melnikov" Date: Mon, 18 Apr 2016 19:16:08 +0300 Subject: [PATCH] Switch console pty to raw mode. Without this some ncurses-based programs behave incorrectly Signed-off-by: Andrey Jr. Melnikov --- src/lxc/console.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lxc/console.c b/src/lxc/console.c index a3463773f..c6f6adc61 100644 --- a/src/lxc/console.c +++ b/src/lxc/console.c @@ -262,9 +262,10 @@ int lxc_setup_tios(int fd, struct termios *oldtios) /* Remove the echo characters and signal reception, the echo * will be done with master proxying */ - newtios.c_iflag &= ~IGNBRK; + newtios.c_iflag &= ~(IGNBRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON|IXANY|IXOFF); newtios.c_iflag &= BRKINT; - newtios.c_lflag &= ~(ECHO|ICANON|ISIG); + newtios.c_lflag &= ~(ECHO|ICANON|ISIG|IEXTEN|ECHOE|ECHOK|ECHONL); + newtios.c_oflag &= ~OPOST; newtios.c_cc[VMIN] = 1; newtios.c_cc[VTIME] = 0; -- 2.47.2