aboutsummaryrefslogtreecommitdiff
path: root/gdb/rdi-share/unixcomm.c
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>1999-11-02 04:44:47 +0000
committerJason Molenda <jmolenda@apple.com>1999-11-02 04:44:47 +0000
commit5c44784c11ecc8febfff615b88496c56c9ad5274 (patch)
tree74f9079f5b0ddae1182abf087af8adc02103e149 /gdb/rdi-share/unixcomm.c
parent9503fd8735ec438fcb2fca34afa276e3e6ca94f5 (diff)
downloadgdb-5c44784c11ecc8febfff615b88496c56c9ad5274.zip
gdb-5c44784c11ecc8febfff615b88496c56c9ad5274.tar.gz
gdb-5c44784c11ecc8febfff615b88496c56c9ad5274.tar.bz2
import gdb-1999-11-01 snapshot
Diffstat (limited to 'gdb/rdi-share/unixcomm.c')
-rw-r--r--gdb/rdi-share/unixcomm.c9
1 files changed, 8 insertions, 1 deletions
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;