fzy

terminal fuzzy finder picker

git clone https://9o.is/git/fzy.git

commit b9748ab7ab05f4c44bdd6484118101e767f7fa05
parent 7e06b50cf9058b670a180c62b76b6d9494491ed5
Author: John Hawthorn <john@hawthorn.email>
Date:   Sat, 15 Sep 2018 18:02:32 -0700

Better pselect error handling

Diffstat:
Msrc/tty.c | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/tty.c b/src/tty.c @@ -7,6 +7,7 @@ #include <sys/ioctl.h> #include <sys/select.h> #include <signal.h> +#include <errno.h> #include "tty.h" @@ -117,7 +118,12 @@ int tty_input_ready(tty_t *tty, long int timeout, int return_on_signal) { return_on_signal ? NULL : &mask); if (err < 0) { - return 0; + if (errno == EINTR) { + return 0; + } else { + perror("select"); + exit(EXIT_FAILURE); + } } else { return FD_ISSET(tty->fdin, &readfs); }