]> git.eshelyaron.com Git - emacs.git/commitdiff
(readchar): Extend BLOCK_INPUT block to ferror/clearerr.
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Wed, 28 Mar 2007 08:16:19 +0000 (08:16 +0000)
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Wed, 28 Mar 2007 08:16:19 +0000 (08:16 +0000)
src/lread.c

index 30aab7cce322efd92eda4fd516150df0496fcf45..1f1ddddde4f9913fd46dc8beb5f0fc15a420c248 100644 (file)
@@ -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;
     }