changeset 6972:2238e97bc571

(read_avail_input): Don't retry read.
author Karl Heuer <kwzh@gnu.org>
date Wed, 20 Apr 1994 00:24:59 +0000
parents 90859715093d
children 7aa70fb3afa8
files src/keyboard.c
diffstat 1 files changed, 12 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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)