diff options
| author | YAMAMOTO Mitsuharu | 2007-03-28 08:16:19 +0000 |
|---|---|---|
| committer | YAMAMOTO Mitsuharu | 2007-03-28 08:16:19 +0000 |
| commit | cd83514ad334724c8e467a603ecf2864eb89a4ca (patch) | |
| tree | b205e3e3d4a39e16e0a1de661cffa7ac20a32c0d /src | |
| parent | 2f213514dfe35d154c853df85a0169a7bb851f3e (diff) | |
| download | emacs-cd83514ad334724c8e467a603ecf2864eb89a4ca.tar.gz emacs-cd83514ad334724c8e467a603ecf2864eb89a4ca.zip | |
(readchar): Extend BLOCK_INPUT block to ferror/clearerr.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lread.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lread.c b/src/lread.c index 30aab7cce32..1f1ddddde4f 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -327,18 +327,18 @@ readchar (readcharfun) | |||
| 327 | { | 327 | { |
| 328 | BLOCK_INPUT; | 328 | BLOCK_INPUT; |
| 329 | c = getc (instream); | 329 | c = getc (instream); |
| 330 | UNBLOCK_INPUT; | ||
| 331 | #ifdef EINTR | 330 | #ifdef EINTR |
| 332 | /* Interrupted reads have been observed while reading over the network */ | 331 | /* Interrupted reads have been observed while reading over the network */ |
| 333 | while (c == EOF && ferror (instream) && errno == EINTR) | 332 | while (c == EOF && ferror (instream) && errno == EINTR) |
| 334 | { | 333 | { |
| 334 | UNBLOCK_INPUT; | ||
| 335 | QUIT; | 335 | QUIT; |
| 336 | clearerr (instream); | ||
| 337 | BLOCK_INPUT; | 336 | BLOCK_INPUT; |
| 337 | clearerr (instream); | ||
| 338 | c = getc (instream); | 338 | c = getc (instream); |
| 339 | UNBLOCK_INPUT; | ||
| 340 | } | 339 | } |
| 341 | #endif | 340 | #endif |
| 341 | UNBLOCK_INPUT; | ||
| 342 | return c; | 342 | return c; |
| 343 | } | 343 | } |
| 344 | 344 | ||