1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-02-07 20:54:32 +00:00

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

This commit is contained in:
YAMAMOTO Mitsuharu 2007-03-28 08:16:19 +00:00
parent 2f213514df
commit cd83514ad3

View 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)
{
QUIT;
clearerr (instream);
BLOCK_INPUT;
c = getc (instream);
UNBLOCK_INPUT;
QUIT;
BLOCK_INPUT;
clearerr (instream);
c = getc (instream);
}
#endif
UNBLOCK_INPUT;
return c;
}