]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Switch console pty to raw mode. Without this some ncurses-based programs behave incor... 981/head
authorAndrey Jr. Melnikov <temnota.am@gmail.com>
Mon, 18 Apr 2016 16:16:08 +0000 (19:16 +0300)
committerAndrey Jr. Melnikov <temnota.am@gmail.com>
Mon, 18 Apr 2016 16:16:08 +0000 (19:16 +0300)
Signed-off-by: Andrey Jr. Melnikov <temnota.am@gmail.com>
src/lxc/console.c

index a3463773fe71518963319003c0c12bffbbced1bc..c6f6adc616b5ee38f9717fae82bd5a4f421c1293 100644 (file)
@@ -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;