Re: [PATCH RFA] lin-lwp.c: Block SIGCHLD events when attaching

Mark Kettenis
2001-11-21T11:54:10Z

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