# HG changeset patch # User YAMAMOTO Mitsuharu # Date 1175069779 0 # Node ID 846cbca78bc82e0b9dcc54e297c0a31c6639f9c7 # Parent 2bb28b95763920cb8f58be185587d3447c809e85 (readchar): Extend BLOCK_INPUT block to ferror/clearerr. diff -r 2bb28b957639 -r 846cbca78bc8 src/lread.c --- a/src/lread.c Wed Mar 28 08:16:05 2007 +0000 +++ b/src/lread.c Wed Mar 28 08:16:19 2007 +0000 @@ -327,18 +327,18 @@ { 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; }