From: YAMAMOTO Mitsuharu Date: Wed, 28 Mar 2007 08:16:19 +0000 (+0000) Subject: (readchar): Extend BLOCK_INPUT block to ferror/clearerr. X-Git-Tag: emacs-pretest-22.0.97~140 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cd83514ad334724c8e467a603ecf2864eb89a4ca;p=emacs.git (readchar): Extend BLOCK_INPUT block to ferror/clearerr. --- 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; }