diff options
Diffstat (limited to 'loginutils')
-rw-r--r-- | loginutils/getty.c | 2 | ||||
-rw-r--r-- | loginutils/vlock.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/loginutils/getty.c b/loginutils/getty.c index 162c169..ba6c784 100644 --- a/loginutils/getty.c +++ b/loginutils/getty.c @@ -316,7 +316,7 @@ static void init_tty_attrs(int speed) /* non-raw output; add CR to each NL */ G.tty_attrs.c_oflag = OPOST | ONLCR; - /* reads would block only if < 1 char is available */ + /* reads will block only if < 1 char is available */ G.tty_attrs.c_cc[VMIN] = 1; /* no timeout (reads block forever) */ G.tty_attrs.c_cc[VTIME] = 0; diff --git a/loginutils/vlock.c b/loginutils/vlock.c index 52ae607..5ba6a87 100644 --- a/loginutils/vlock.c +++ b/loginutils/vlock.c @@ -105,12 +105,12 @@ int vlock_main(int argc UNUSED_PARAM, char **argv) ioctl(STDIN_FILENO, VT_SETMODE, &vtm); #endif +//TODO: use set_termios_to_raw() tcgetattr(STDIN_FILENO, &oterm); term = oterm; - term.c_iflag &= ~BRKINT; - term.c_iflag |= IGNBRK; - term.c_lflag &= ~ISIG; - term.c_lflag &= ~(ECHO | ECHOCTL); + term.c_iflag |= IGNBRK; /* ignore serial break (why? VTs don't have breaks, right?) */ + term.c_iflag &= ~BRKINT; /* redundant? "dont translate break to SIGINT" */ + term.c_lflag &= ~(ISIG | ECHO | ECHOCTL); /* ignore ^C ^Z, echo off */ tcsetattr_stdin_TCSANOW(&term); while (1) { |