aboutsummaryrefslogtreecommitdiff
path: root/bb.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2019-06-17 16:45:24 -0700
committerBruce Hill <bruce@bruce-hill.com>2019-06-17 16:45:24 -0700
commitfbfe8689a83884c88518b22f0b5bb2dbf453e408 (patch)
tree2c0737942714660f0cde2c099348bd678f012790 /bb.c
parent8d5e68d4441228b0c101940a9b7189938e755130 (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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bb.c b/bb.c
index 8aed841..6e04403 100644
--- a/bb.c
+++ b/bb.c
@@ -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);