From e5cd231fd16c11ccde5a4ca830f20ad859ef6d9e Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Sat, 1 Feb 2014 13:47:59 +1000 Subject: Stop ignoring read errors. --- handlekeys.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/handlekeys.c b/handlekeys.c index 2d30d53..d365496 100644 --- a/handlekeys.c +++ b/handlekeys.c @@ -258,12 +258,7 @@ void handle_keys(long extra, // If that's not true (which is entirely likely), then we have to get // complicated with circular buffers and stuff, or just one byte at a time. j = read(0, &buffer[buffIndex], sizeof(buffer) - (buffIndex + 1)); - if (j < 0) // An error happened. - { - // For now, just ignore errors. - fprintf(stderr, "input error on %d\n", p); - fflush(stderr); - } + if (j < 0) perror_exit("input error"); else if (j == 0) // End of file. { stillRunning = 0; -- cgit v1.1