diff options
author | midipix <writeonce@midipix.org> | 2019-10-13 23:30:43 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2019-10-13 23:30:43 +0000 |
commit | d7a211d5fc0a16ba26503ed9e6110c680774cad5 (patch) | |
tree | 5dfe140bb5fff8893e74a44bff3fc424053be82c | |
parent | 635a58cf339584986516008537ff26b7946b3af2 (diff) | |
download | chainport-d7a211d5fc0a16ba26503ed9e6110c680774cad5.tar.bz2 chainport-d7a211d5fc0a16ba26503ed9e6110c680774cad5.tar.xz |
mgdb: winnt_wait_event(): properly handle EINTR.
-rw-r--r-- | overlay/mgdb/gdb/winnt-nat.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/overlay/mgdb/gdb/winnt-nat.c b/overlay/mgdb/gdb/winnt-nat.c index ad3137c..16e7b3c 100644 --- a/overlay/mgdb/gdb/winnt-nat.c +++ b/overlay/mgdb/gdb/winnt-nat.c @@ -906,6 +906,7 @@ static enum gdb_signal winnt_dbg_signal(struct __dbg_event * event) static struct __dbg_event * winnt_wait_event(ptid_t ptid) { + int ret; struct __dbg_event event; struct winnt_process * pdbg; struct winnt_process * pcap; @@ -938,8 +939,9 @@ static struct __dbg_event * winnt_wait_event(ptid_t ptid) ? winnt_poll_one_init(pfds,ptid.pid) : winnt_poll_init(pfds); - if (poll(pfds,nfds,-1) < 0) - return 0; + do { + ret = poll(pfds,nfds,-1); + } while ((ret < 0) && (errno == EINTR)); for (i=0, pfd=0; i<nfds && !pfd; i++) if (pfds[i].revents & POLLIN) |