diff options
| author | Karl Heuer | 1994-04-20 00:24:59 +0000 |
|---|---|---|
| committer | Karl Heuer | 1994-04-20 00:24:59 +0000 |
| commit | 791587eebf6d9bd552262845aaa191b8523e5ac9 (patch) | |
| tree | 1ce223fb2c2ac5c19a6450576fa63faf57384671 | |
| parent | f9f9cd92969db9ac39bb97d023028f9793e26b3b (diff) | |
| download | emacs-791587eebf6d9bd552262845aaa191b8523e5ac9.tar.gz emacs-791587eebf6d9bd552262845aaa191b8523e5ac9.zip | |
(read_avail_input): Don't retry read.
| -rw-r--r-- | src/keyboard.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 753ba028b4b..0c025d6b624 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -3355,16 +3355,25 @@ read_avail_input (expected) | |||
| 3355 | if (nread == 0) | 3355 | if (nread == 0) |
| 3356 | kill (0, SIGHUP); | 3356 | kill (0, SIGHUP); |
| 3357 | #endif | 3357 | #endif |
| 3358 | /* Retry the read if it was interrupted. */ | ||
| 3359 | } | 3358 | } |
| 3360 | while (nread < 0 && (errno == EINTR | 3359 | while ( |
| 3360 | /* We used to retry the read if it was interrupted. | ||
| 3361 | But this does the wrong thing when O_NDELAY causes | ||
| 3362 | an EAGAIN error. Does anybody know of a situation | ||
| 3363 | where a retry is actually needed? */ | ||
| 3364 | #if 0 | ||
| 3365 | nread < 0 && (errno == EAGAIN | ||
| 3361 | #ifdef EFAULT | 3366 | #ifdef EFAULT |
| 3362 | || errno == EFAULT | 3367 | || errno == EFAULT |
| 3363 | #endif | 3368 | #endif |
| 3364 | #ifdef EBADSLT | 3369 | #ifdef EBADSLT |
| 3365 | || errno == EBADSLT | 3370 | || errno == EBADSLT |
| 3366 | #endif | 3371 | #endif |
| 3367 | )); | 3372 | ) |
| 3373 | #else | ||
| 3374 | 0 | ||
| 3375 | #endif | ||
| 3376 | ); | ||
| 3368 | 3377 | ||
| 3369 | #ifndef FIONREAD | 3378 | #ifndef FIONREAD |
| 3370 | #if defined (USG) || defined (DGUX) | 3379 | #if defined (USG) || defined (DGUX) |