This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]