Re: vfork

Linus Torvalds (torvalds@transmeta.com)
Wed, 10 Nov 1999 11:34:10 -0800 (PST)


On Wed, 10 Nov 1999, Alan Cox wrote:
<
> > Sounds like the correct fix is not vfork()-related at all, but rather a
> > flag to clone() to set "trace child process", so that the new child starts
> > out stopped and traced. And some way for strace to get at the child pid.
>
> Its such a brilliant idea that we already had it...
>
> if (!(clone_flags & CLONE_PTRACE))
> new_flags &= ~(PF_PTRACED|PF_TRACESYS);
>
> That was added for the threaded-gdb folks a while back 8)

It doesn't notify the right parent, though.

It also requires the tracer to turn a fork()/vfork() into a clone(), but I
guess that's ok. The lack of re-parenting looks like a killer, though.

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/