[PATCH RFA] lin-lwp.c: Block SIGCHLD events when attaching
Mark Kettenis
kettenis@science.uva.nl
Thu Nov 8 13:03:00 GMT 2001
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
More information about the Gdb-patches
mailing list