Commit cd83514a authored by YAMAMOTO Mitsuharu's avatar YAMAMOTO Mitsuharu
Browse files

(readchar): Extend BLOCK_INPUT block to ferror/clearerr.

parent 2f213514
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment