diff options
Diffstat (limited to 'gdb/ser-base.c')
-rw-r--r-- | gdb/ser-base.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gdb/ser-base.c b/gdb/ser-base.c index 25af66a..c51be07 100644 --- a/gdb/ser-base.c +++ b/gdb/ser-base.c @@ -213,6 +213,7 @@ ser_base_wait_for (struct serial *scb, int timeout) int numfds; struct timeval tv; fd_set readfds, exceptfds; + int nfds; /* NOTE: Some OS's can scramble the READFDS when the select() call fails (ex the kernel with Red Hat 5.2). Initialize all @@ -226,10 +227,13 @@ ser_base_wait_for (struct serial *scb, int timeout) FD_SET (scb->fd, &readfds); FD_SET (scb->fd, &exceptfds); + QUIT; + + nfds = scb->fd + 1; if (timeout >= 0) - numfds = gdb_select (scb->fd + 1, &readfds, 0, &exceptfds, &tv); + numfds = interruptible_select (nfds, &readfds, 0, &exceptfds, &tv); else - numfds = gdb_select (scb->fd + 1, &readfds, 0, &exceptfds, 0); + numfds = interruptible_select (nfds, &readfds, 0, &exceptfds, 0); if (numfds <= 0) { @@ -455,6 +459,8 @@ ser_base_write (struct serial *scb, const void *buf, size_t count) while (count > 0) { + QUIT; + cc = scb->ops->write_prim (scb, str, count); if (cc < 0) |