While performing some tests with valgrind, I have found a slight
difference between the documentation and the behaviour with regards to
tracing child processes. When a child process is fork'd and then exec'd
the tracing behaviour correctly follows the --trace-children flag.
However if the child process is created just by forking the main
program, then it is always traced.
Is this the desired behaviour? I expected it to behave like strace and
ltrace and the like where they stop tracing after the fork, not after
the exec.
(attached is a small test program that demonstrates the tracing of
children created just be a fork)
Cheers
Crispin
|