aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDavid Walter Seikel2014-02-01 13:47:59 +1000
committerDavid Walter Seikel2014-02-01 13:47:59 +1000
commite5cd231fd16c11ccde5a4ca830f20ad859ef6d9e (patch)
tree4622c533d348c227a6f29ec05d85338acbe7d804
parentCheck for lone escapes a little differently. (diff)
downloadboxes-e5cd231fd16c11ccde5a4ca830f20ad859ef6d9e.zip
boxes-e5cd231fd16c11ccde5a4ca830f20ad859ef6d9e.tar.gz
boxes-e5cd231fd16c11ccde5a4ca830f20ad859ef6d9e.tar.bz2
boxes-e5cd231fd16c11ccde5a4ca830f20ad859ef6d9e.tar.xz
Stop ignoring read errors.
-rw-r--r--handlekeys.c7
1 files changed, 1 insertions, 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,
258 // If that's not true (which is entirely likely), then we have to get 258 // If that's not true (which is entirely likely), then we have to get
259 // complicated with circular buffers and stuff, or just one byte at a time. 259 // complicated with circular buffers and stuff, or just one byte at a time.
260 j = read(0, &buffer[buffIndex], sizeof(buffer) - (buffIndex + 1)); 260 j = read(0, &buffer[buffIndex], sizeof(buffer) - (buffIndex + 1));
261 if (j < 0) // An error happened. 261 if (j < 0) perror_exit("input error");
262 {
263 // For now, just ignore errors.
264 fprintf(stderr, "input error on %d\n", p);
265 fflush(stderr);
266 }
267 else if (j == 0) // End of file. 262 else if (j == 0) // End of file.
268 { 263 {
269 stillRunning = 0; 264 stillRunning = 0;