This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: RFA: EINTR in procfs_wait
- To: Fernando Nasser <fnasser at redhat dot com>
- Subject: Re: RFA: EINTR in procfs_wait
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Wed, 11 Apr 2001 14:13:11 -0400
- Cc: gdb-patches at sources dot redhat dot com
- References: <3AD32106.12A0443E@redhat.com>
Fernando Nasser wrote:
>
> Folks,
>
> I got this patch and it seems that we did forget to test for EINTR in
> procfs_wait(). It looks like an "obvious fix" but I would like someone
> else to double check it.
Anything involving a goto is not an obvious fix :-)
> + goto wait_again;
In theory, procfs_wait() should be able to return (target.h):
/* This is used for target async and extended-async
only. Remote_async_wait() returns this when there is an event
on the inferior, but the rest of the world is not interested in
it. The inferior has not stopped, but has just sent some output
to the console, for instance. In this case, we want to go back
to the event loop and wait there for another event from the
inferior, rather than being stuck in the remote_async_wait()
function. This way the event loop is responsive to other events,
like for instance the user typing. */
TARGET_WAITKIND_IGNORE
and let the event-loop force the reentry. Looking at the code
(infrun.c:handle_inferior_event()):
/* We had an event in the inferior, but we are not interested
in handling it at this level. The lower layers have already
done what needs to be done, if anything. This case can
occur only when the target is async or extended-async. One
of the circumstamces for this to happen is when the
inferior produces output for the console. The inferior has
not stopped, and we are ignoring the event. */
case TARGET_WAITKIND_IGNORE:
ecs->wait_some_more = 1;
return;
I think the restriction that that KIND only apples to
async/extended-async is incorrect.
Andrew