* corelow.c, exec.c, inftarg.c, m3-nat.c, op50-rom.c, procfs.c,
[deliverable/binutils-gdb.git] / gdb / ser-tcp.c
index c03814981d266667927862259442e5cb7b3c9cae..7e5735b53512dbd3086ca78a34d8e943f0b7945d 100644 (file)
@@ -73,7 +73,7 @@ tcp_open(scb, name)
 
   if (!hostent)
     {
-      fprintf (stderr, "%s: unknown host\n", hostname);
+      fprintf_unfiltered (gdb_stderr, "%s: unknown host\n", hostname);
       errno = ENOENT;
       return -1;
     }
@@ -218,7 +218,12 @@ tcp_readchar(scb, timeout)
   if (status < 0)
     return status;
 
-  scb->bufcnt = read(scb->fd, scb->buf, BUFSIZ);
+  while (1)
+    {
+      scb->bufcnt = read(scb->fd, scb->buf, BUFSIZ);
+      if (scb->bufcnt != -1 || errno != EINTR)
+       break;
+    }
 
   if (scb->bufcnt <= 0)
     if (scb->bufcnt == 0)
This page took 0.02367 seconds and 4 git commands to generate.