[PATCH] Do not trace children created with CLONE_UNTRACED flag
Wang Chao
wang.chao at cn.fujitsu.com
Fri Sep 10 08:52:44 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.
Thanks,
Wang Chao
More information about the Strace-devel
mailing list