From: Mark Wooding Date: Wed, 27 Sep 2017 19:27:09 +0000 (+0100) Subject: pkstream/pkstream.c: Handle errors from select(2) properly. X-Git-Tag: 1.5.0~126 X-Git-Url: https://git.distorted.org.uk/~mdw/tripe/commitdiff_plain/c14225f66a85e219ff985884ea8c5c1f682202b7 pkstream/pkstream.c: Handle errors from select(2) properly. --- diff --git a/pkstream/pkstream.c b/pkstream/pkstream.c index f03d0ffe..4e565e00 100644 --- a/pkstream/pkstream.c +++ b/pkstream/pkstream.c @@ -436,8 +436,10 @@ int main(int argc, char *argv[]) } else dofwd(STDIN_FILENO, STDOUT_FILENO); - for (;;) - sel_select(&sel); + for (;;) { + if (sel_select(&sel) && errno != EINTR) + die(1, "select failed: %s", strerror(errno)); + } return (0); }