shell_builtin_read: set cc[VMIN] to 1; lineedit: don't clear c_cc[VINTR]
authorDenys Vlasenko <vda.linux@googlemail.com>
Sun, 15 Jan 2012 21:58:06 +0000 (22:58 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sun, 15 Jan 2012 21:58:06 +0000 (22:58 +0100)
commit7ce209b9d4f6053b7e6d07dec66e382bc3614c35
tree5e4aaaf494f771b61707bc12df849c01ad9e37c0
parentd29ae7e071a11c51436922654c2de73a8ac36333
shell_builtin_read: set cc[VMIN] to 1; lineedit: don't clear c_cc[VINTR]

First change fixes "read -n NUM". Apparently poll() won't report
data availability if cc[VMIN] > 1 until there are at least cc[VMIN] bytes.

function                                             old     new   delta
read_line_input                                     3885    3877      -8
shell_builtin_read                                  1097    1087     -10
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-18)             Total: -18 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
libbb/lineedit.c
shell/shell_common.c