[PATCH] Do not trace children created with CLONE_UNTRACED flag

Roland McGrath roland at redhat.com
Fri Sep 10 09:26:26 UTC 2010


> Sent on 2010-9-10 16:05, Roland McGrath wrote:
> > 
> > diff --git a/process.c b/process.c
> > index 8af960a..50f5ae8 100644
> > --- a/process.c
> > +++ b/process.c
> > @@ -796,7 +796,8 @@ int
> >  internal_fork(struct tcb *tcp)
> >  {
> >  	if (entering(tcp)) {
> > -		if (!followfork)
> > +		tcp->flags &= ~TCB_FOLLOWFORK;
> > +		if (!followfork || (tcp->u_arg[ARG_FLAGS] & CLONE_UNTRACED))
> >  			return 0;
> >  		fork_tcb(tcp);
> >  		if (setbpt(tcp) < 0)
> 
> I quite agree with the above change.

Does that mean you tested it?




More information about the Strace-devel mailing list