This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH RFA] lin-lwp.c: Block SIGCHLD events when attaching
- From: Mark Kettenis <kettenis at science dot uva dot nl>
- To: Kevin Buettner <kevinb at cygnus dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: 21 Nov 2001 12:52:55 +0100
- Subject: Re: [PATCH RFA] lin-lwp.c: Block SIGCHLD events when attaching
- References: <1011119193045.ZM16376@ocotillo.lan>
Kevin Buettner <kevinb@cygnus.com> writes:
> When doing a lin_lwp_attach_lwp(), it is sometimes possible to receive
> a SIGCHLD signal thus causing the waitpid() call to fail with EINTR.
> This in turn causes the second assert() in lin_lwp_attach_lwp() to
> fail.
Thanks for tracking this down. Note that getting this EINTR is a
side-effect of the tricks we play with sigsuspend in lin_lwp_wait.
> The fix is below. Okay to commit?
Looks fine to me. lin_lwp_attach_lwp() should not be called unless
the inferior is already running so blocking SIGCHLD here is OK.
Mark