Fix inconsistent handling of EINTR in ser-*.c backends
[deliverable/binutils-gdb.git] / gdb / ser-unix.c
index c54b2e10f2781826efcaeeb8dfc8353f201f1cd2..562e98b2f5e5189f4aae45718c24385ce6ce7909 100644 (file)
@@ -1002,21 +1002,11 @@ when debugging using remote targets."),
 int
 ser_unix_read_prim (struct serial *scb, size_t count)
 {
-  int status;
-
-  while (1)
-    {
-      status = read (scb->fd, scb->buf, count);
-      if (status != -1 || errno != EINTR)
-       break;
-    }
-  return status;
+  return read (scb->fd, scb->buf, count);
 }
 
 int
 ser_unix_write_prim (struct serial *scb, const void *buf, size_t len)
 {
-  /* ??? Historically, GDB has not retried calls to "write" that
-     result in EINTR.  */
   return write (scb->fd, buf, len);
 }
This page took 0.029639 seconds and 4 git commands to generate.