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:
parent
2f213514df
commit
cd83514ad3
10
src/lread.c
10
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)
|
||||
{
|
||||
QUIT;
|
||||
clearerr (instream);
|
||||
BLOCK_INPUT;
|
||||
c = getc (instream);
|
||||
UNBLOCK_INPUT;
|
||||
QUIT;
|
||||
BLOCK_INPUT;
|
||||
clearerr (instream);
|
||||
c = getc (instream);
|
||||
}
|
||||
#endif
|
||||
UNBLOCK_INPUT;
|
||||
return c;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user