mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-04 22:15:12 +08:00
From Peter Schauer <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>
* procfs.c (wait_fd): Handle EINTR error return from poll by restarting the poll. * defs.h (PIDGET): Define a default version that just returns its argument unchanged. * inflow.c (terminal_init_inferior): Eliminate #ifdef of PIDGET and fold both alternatives into common code. (pass_signal): Use PIDGET for pid passed to kill().
This commit is contained in:
@ -1,3 +1,14 @@
|
|||||||
|
Fri Nov 15 15:34:18 1996 Fred Fish <fnf@cygnus.com>
|
||||||
|
|
||||||
|
From Peter Schauer <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>
|
||||||
|
* procfs.c (wait_fd): Handle EINTR error return from poll
|
||||||
|
by restarting the poll.
|
||||||
|
* defs.h (PIDGET): Define a default version that just
|
||||||
|
returns its argument unchanged.
|
||||||
|
* inflow.c (terminal_init_inferior): Eliminate #ifdef
|
||||||
|
of PIDGET and fold both alternatives into common code.
|
||||||
|
(pass_signal): Use PIDGET for pid passed to kill().
|
||||||
|
|
||||||
Thu Nov 14 15:54:20 1996 Michael Meissner <meissner@tiktok.cygnus.com>
|
Thu Nov 14 15:54:20 1996 Michael Meissner <meissner@tiktok.cygnus.com>
|
||||||
|
|
||||||
* utils.c (paddr,preg): Use a static variable initialized to 32
|
* utils.c (paddr,preg): Use a static variable initialized to 32
|
||||||
|
17
gdb/procfs.c
17
gdb/procfs.c
@ -639,7 +639,16 @@ wait_fd ()
|
|||||||
set_sigio_trap ();
|
set_sigio_trap ();
|
||||||
|
|
||||||
#ifndef LOSING_POLL
|
#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
|
#else
|
||||||
pi = current_procinfo;
|
pi = current_procinfo;
|
||||||
|
|
||||||
@ -665,12 +674,6 @@ wait_fd ()
|
|||||||
|
|
||||||
#ifndef LOSING_POLL
|
#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++)
|
for (i = 0; i < num_poll_list && num_fds > 0; i++)
|
||||||
{
|
{
|
||||||
if ((poll_list[i].revents & (POLLPRI|POLLERR|POLLHUP|POLLNVAL)) == 0)
|
if ((poll_list[i].revents & (POLLPRI|POLLERR|POLLHUP|POLLNVAL)) == 0)
|
||||||
|
Reference in New Issue
Block a user