[PATCH] Add gdb remote protocol handling to strace

Dmitry V. Levin ldv at altlinux.org
Thu Nov 2 17:27:30 UTC 2017


On Thu, Nov 02, 2017 at 02:01:20PM +0100, Eugene Syromiatnikov wrote:
> On Thu, Nov 02, 2017 at 06:38:39AM +0300, Dmitry V. Levin wrote:
> > On Tue, Oct 17, 2017 at 02:29:31PM -0400, Stan Cox wrote:
> > [...]
> > > +	/* Make sure SIGCHLD has the default action so that waitpid
> > > +	   definitely works without losing track of children.  The user
> > > +	   should not have given us a bogus state to inherit, but he might
> > > +	   have.  Arguably we should detect SIG_IGN here and pass it on
> > > +	   to children, but probably noone really needs that.  */
> > > +	signal(SIGCHLD, SIG_DFL);
> > 
> > Why do you ever need this change?
> 
> This change is needed for handling the child gdbserver process; I assume
> that ought to be handled in a way similar to the way -o| child process
> is handled now. And that leads to the fact that it ought to be refactored
> into something that can handle both, as there are some parts of the code
> that do the same things twice; moreover, personally I'd prefer Josh's
> way of spawning child process that employs posix_spawn rather than
> that current implementation which incorrectly uses vfork.

OK, but this signal(SIGCHLD, SIG_DFL) is not needed regardless
of the method of handling child processes.


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20171102/1c3a42ff/attachment.bin>


More information about the Strace-devel mailing list