Re: vfork

Linus Torvalds (torvalds@transmeta.com)
Wed, 10 Nov 1999 09:16:52 -0800 (PST)


On 10 Nov 1999, Kai Henningsen wrote:
>
> Well, in 2.2.12 it seems strace can't follow vfork()s without some kernel
> patch. Or so I gather from the docs and the failure to perform.
>
> Is this better in 2.3.*?

I always thought that was just because strace didn't understand about
vfork().

On the other hand, maybe it's a generic problem with strace - if it gets
the child PID from the return value of "fork()", and attaches to it that
way, that has two problems:
- it won't work reliably even under normal fork(), as it's timing-
dependent, and by the time strace has attached to the child the child
might have already done several system calls.
- it would fail completely with vfork(), as vfork() only returns after
the child has execve'd

Who's maintaining strace these days?

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/