diff options
author | Jason Felice <jason.m.felice@gmail.com> | 2018-05-04 12:32:40 -0400 |
---|---|---|
committer | Jason Felice <jason.m.felice@gmail.com> | 2018-05-04 12:32:40 -0400 |
commit | baa0d7ece4eb8401a61a0bebdb5264bf805a34c2 (patch) | |
tree | 6eb6d5717b792504b93bd8a0eae275942fe00425 /src/tty.c | |
parent | 39ce2809029e3273ed212d9b31ffa350f12d521c (diff) |
Abort if Esc is pressed
Diffstat (limited to 'src/tty.c')
-rw-r--r-- | src/tty.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -87,9 +87,9 @@ char tty_getchar(tty_t *tty) { } } -int tty_input_ready(tty_t *tty) { +int tty_input_ready(tty_t *tty, int pending) { fd_set readfs; - struct timeval tv = {0, 0}; + struct timeval tv = {0, pending ? 500000 : 0}; FD_ZERO(&readfs); FD_SET(tty->fdin, &readfs); select(tty->fdin + 1, &readfs, NULL, NULL, &tv); |