diff options
Diffstat (limited to 'gdb/procfs.c')
-rw-r--r-- | gdb/procfs.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/gdb/procfs.c b/gdb/procfs.c index f5e93fc..315110f 100644 --- a/gdb/procfs.c +++ b/gdb/procfs.c @@ -639,7 +639,16 @@ wait_fd () set_sigio_trap (); #ifndef LOSING_POLL - num_fds = poll (poll_list, num_poll_list, -1); + while (1) + { + num_fds = poll (poll_list, num_poll_list, -1); + if (num_fds > 0) + break; + if (num_fds < 0 && errno == EINTR) + continue; + print_sys_errmsg ("poll failed", errno); + error ("Poll failed, returned %d", num_fds); + } #else pi = current_procinfo; @@ -665,12 +674,6 @@ wait_fd () #ifndef LOSING_POLL - if (num_fds <= 0) - { - print_sys_errmsg ("poll failed\n", errno); - error ("Poll failed, returned %d", num_fds); - } - for (i = 0; i < num_poll_list && num_fds > 0; i++) { if ((poll_list[i].revents & (POLLPRI|POLLERR|POLLHUP|POLLNVAL)) == 0) |