From: Andrey Jr. Melnikov Date: Mon, 18 Apr 2016 16:16:08 +0000 (+0300) Subject: Switch console pty to raw mode. Without this some ncurses-based programs behave incor... X-Git-Tag: lxc-2.1.0~443^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F981%2Fhead;p=thirdparty%2Flxc.git Switch console pty to raw mode. Without this some ncurses-based programs behave incorrectly Signed-off-by: Andrey Jr. Melnikov --- 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;