Skip to content

Commit

Permalink
Switch console pty to raw mode. Without this some ncurses-based progr…
Browse files Browse the repository at this point in the history
…ams behave incorrectly

Signed-off-by: Andrey Jr. Melnikov <temnota.am@gmail.com>
  • Loading branch information
LynxChaus authored and stgraber committed May 11, 2016
1 parent 02fdb53 commit 3aec413
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lxc/console.c
Expand Up @@ -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;

Expand Down

0 comments on commit 3aec413

Please sign in to comment.