# HG changeset patch # User Karl Heuer # Date 766801499 0 # Node ID 2238e97bc571dd49543939de0fd297e04e2b116a # Parent 90859715093d225cce046c99801ad41ce7235794 (read_avail_input): Don't retry read. diff -r 90859715093d -r 2238e97bc571 src/keyboard.c --- a/src/keyboard.c Wed Apr 20 00:14:15 1994 +0000 +++ b/src/keyboard.c Wed Apr 20 00:24:59 1994 +0000 @@ -3355,16 +3355,25 @@ if (nread == 0) kill (0, SIGHUP); #endif - /* Retry the read if it was interrupted. */ } - while (nread < 0 && (errno == EINTR + while ( + /* We used to retry the read if it was interrupted. + But this does the wrong thing when O_NDELAY causes + an EAGAIN error. Does anybody know of a situation + where a retry is actually needed? */ +#if 0 + nread < 0 && (errno == EAGAIN #ifdef EFAULT || errno == EFAULT #endif #ifdef EBADSLT || errno == EBADSLT #endif - )); + ) +#else + 0 +#endif + ); #ifndef FIONREAD #if defined (USG) || defined (DGUX)