aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editors/vi.c2
-rw-r--r--loginutils/getty.c6
-rw-r--r--util-linux/more.c3
3 files changed, 6 insertions, 5 deletions
diff --git a/editors/vi.c b/editors/vi.c
index 6070c48d2..4a2d5d4f1 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -2304,7 +2304,7 @@ static void rawmode(void)
2304{ 2304{
2305 tcgetattr(0, &term_orig); 2305 tcgetattr(0, &term_orig);
2306 term_vi = term_orig; 2306 term_vi = term_orig;
2307 term_vi.c_lflag &= (~ICANON & ~ECHO); // leave ISIG ON- allow intr's 2307 term_vi.c_lflag &= (~ICANON & ~ECHO); // leave ISIG on - allow intr's
2308 term_vi.c_iflag &= (~IXON & ~ICRNL); 2308 term_vi.c_iflag &= (~IXON & ~ICRNL);
2309 term_vi.c_oflag &= (~ONLCR); 2309 term_vi.c_oflag &= (~ONLCR);
2310 term_vi.c_cc[VMIN] = 1; 2310 term_vi.c_cc[VMIN] = 1;
diff --git a/loginutils/getty.c b/loginutils/getty.c
index 1f417591b..afb411b98 100644
--- a/loginutils/getty.c
+++ b/loginutils/getty.c
@@ -294,8 +294,10 @@ static void init_tty_attrs(int speed)
294 /* non-raw output; add CR to each NL */ 294 /* non-raw output; add CR to each NL */
295 G.tty_attrs.c_oflag = OPOST | ONLCR; 295 G.tty_attrs.c_oflag = OPOST | ONLCR;
296 296
297 G.tty_attrs.c_cc[VMIN] = 1; /* block reads if < 1 char is available */ 297 /* reads would block only if < 1 char is available */
298 G.tty_attrs.c_cc[VTIME] = 0; /* no timeout (reads block forever) */ 298 G.tty_attrs.c_cc[VMIN] = 1;
299 /* no timeout (reads block forever) */
300 G.tty_attrs.c_cc[VTIME] = 0;
299#ifdef __linux__ 301#ifdef __linux__
300 G.tty_attrs.c_line = 0; 302 G.tty_attrs.c_line = 0;
301#endif 303#endif
diff --git a/util-linux/more.c b/util-linux/more.c
index efceb71ec..359571397 100644
--- a/util-linux/more.c
+++ b/util-linux/more.c
@@ -85,8 +85,7 @@ int more_main(int argc UNUSED_PARAM, char **argv)
85 cin_fileno = fileno(cin); 85 cin_fileno = fileno(cin);
86 getTermSettings(cin_fileno, &initial_settings); 86 getTermSettings(cin_fileno, &initial_settings);
87 new_settings = initial_settings; 87 new_settings = initial_settings;
88 new_settings.c_lflag &= ~ICANON; 88 new_settings.c_lflag &= ~(ICANON | ECHO);
89 new_settings.c_lflag &= ~ECHO;
90 new_settings.c_cc[VMIN] = 1; 89 new_settings.c_cc[VMIN] = 1;
91 new_settings.c_cc[VTIME] = 0; 90 new_settings.c_cc[VTIME] = 0;
92 setTermSettings(cin_fileno, &new_settings); 91 setTermSettings(cin_fileno, &new_settings);