diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2019-06-17 16:45:24 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2019-06-17 16:45:24 -0700 |
| commit | fbfe8689a83884c88518b22f0b5bb2dbf453e408 (patch) | |
| tree | 2c0737942714660f0cde2c099348bd678f012790 /bb.c | |
| parent | 8d5e68d4441228b0c101940a9b7189938e755130 (diff) | |
Changing IO code to no longer use poll() in favor of just reading input
and using VMIN and VTIME.
Diffstat (limited to 'bb.c')
| -rw-r--r-- | bb.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -6,6 +6,7 @@ #include <dirent.h> #include <fcntl.h> #include <limits.h> +#include <poll.h> #include <signal.h> #include <stdarg.h> #include <stdio.h> @@ -196,8 +197,8 @@ void init_term(void) } memcpy(&bb_termios, &orig_termios, sizeof(bb_termios)); cfmakeraw(&bb_termios); - bb_termios.c_cc[VMIN] = 0; - bb_termios.c_cc[VTIME] = 0; + bb_termios.c_cc[VMIN] = 1; + bb_termios.c_cc[VTIME] = 1; if (tcsetattr(fileno(tty_out), TCSAFLUSH, &bb_termios) == -1) err("Couldn't tcsetattr"); update_term_size(0); |
