diff options
author | Ron Yorston <rmy@pobox.com> | 2012-03-23 12:12:03 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2012-03-23 12:12:03 +0000 |
commit | b0f54743e36af163ae2530c381c485bb29df13dc (patch) | |
tree | cda4cfeaae6e47fe4f14c1b566092be4da9affc4 /shell/shell_common.c | |
parent | 40514a0309939f2446f0d4ed9600cad5de396e7f (diff) | |
parent | ba88826c66411affc1da3614742b454654f7298a (diff) | |
download | busybox-w32-b0f54743e36af163ae2530c381c485bb29df13dc.tar.gz busybox-w32-b0f54743e36af163ae2530c381c485bb29df13dc.tar.bz2 busybox-w32-b0f54743e36af163ae2530c381c485bb29df13dc.zip |
Merge branch 'busybox' into merge
Conflicts:
Makefile.flags
Diffstat (limited to 'shell/shell_common.c')
-rw-r--r-- | shell/shell_common.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/shell/shell_common.c b/shell/shell_common.c index 4329ca05c..0ffe21e0b 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); |