From 5c44784c11ecc8febfff615b88496c56c9ad5274 Mon Sep 17 00:00:00 2001 From: Jason Molenda Date: Tue, 2 Nov 1999 04:44:47 +0000 Subject: import gdb-1999-11-01 snapshot --- gdb/rdi-share/unixcomm.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'gdb/rdi-share/unixcomm.c') diff --git a/gdb/rdi-share/unixcomm.c b/gdb/rdi-share/unixcomm.c index 61d84e3..86bffc0 100644 --- a/gdb/rdi-share/unixcomm.c +++ b/gdb/rdi-share/unixcomm.c @@ -287,7 +287,14 @@ extern int Unix_ReadSerial(unsigned char *buf, int n, bool block) return -1; } else if (err > 0 && FD_ISSET(serpfd, &fdset)) - return read(serpfd, buf, n); + { + int s; + + s = read(serpfd, buf, n); + if (s < 0) + perror("read:"); + return s; + } else /* err == 0 || FD_CLR(serpfd, &fdset) */ { errno = ERRNO_FOR_BLOCKED_IO; -- cgit v1.1