aboutsummaryrefslogtreecommitdiff
path: root/shell/shell_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/shell_common.c')
-rw-r--r--shell/shell_common.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/shell/shell_common.c b/shell/shell_common.c
index bbc22ed34..51c92d60e 100644
--- a/shell/shell_common.c
+++ b/shell/shell_common.c
@@ -138,7 +138,13 @@ shell_builtin_read(void FAST_FUNC (*setvar)(const char *name, const char *val),
138 old_tty = tty; 138 old_tty = tty;
139 if (nchars) { 139 if (nchars) {
140 tty.c_lflag &= ~ICANON; 140 tty.c_lflag &= ~ICANON;
141 tty.c_cc[VMIN] = nchars < 256 ? nchars : 255; 141 // Setting it to more than 1 breaks poll():
142 // it blocks even if there's data. !??
143 //tty.c_cc[VMIN] = nchars < 256 ? nchars : 255;
144 /* reads would block only if < 1 char is available */
145 tty.c_cc[VMIN] = 1;
146 /* no timeout (reads block forever) */
147 tty.c_cc[VTIME] = 0;
142 } 148 }
143 if (read_flags & BUILTIN_READ_SILENT) { 149 if (read_flags & BUILTIN_READ_SILENT) {
144 tty.c_lflag &= ~(ECHO | ECHOK | ECHONL); 150 tty.c_lflag &= ~(ECHO | ECHOK | ECHONL);