From cd83514ad334724c8e467a603ecf2864eb89a4ca Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Wed, 28 Mar 2007 08:16:19 +0000 Subject: [PATCH] (readchar): Extend BLOCK_INPUT block to ferror/clearerr. --- src/lread.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lread.c b/src/lread.c index 30aab7cce32..1f1ddddde4f 100644 --- a/src/lread.c +++ b/src/lread.c @@ -327,18 +327,18 @@ readchar (readcharfun) { BLOCK_INPUT; c = getc (instream); - UNBLOCK_INPUT; #ifdef EINTR /* Interrupted reads have been observed while reading over the network */ while (c == EOF && ferror (instream) && errno == EINTR) { + UNBLOCK_INPUT; QUIT; - clearerr (instream); BLOCK_INPUT; + clearerr (instream); c = getc (instream); - UNBLOCK_INPUT; } #endif + UNBLOCK_INPUT; return c; } -- 2.39.5