diff options
Diffstat (limited to 'gdb/ser-tcp.c')
-rw-r--r-- | gdb/ser-tcp.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gdb/ser-tcp.c b/gdb/ser-tcp.c index 9eb9647..7e5735b 100644 --- a/gdb/ser-tcp.c +++ b/gdb/ser-tcp.c @@ -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) |