option `-f' currently should not follow vfork() (only fork()). There is an
option `-F' to follow specifically vfork().
But on GNU/Linux `-f' already follows even vfork() due to:
struct tcb *tcp;
/* We do special magic with clone for any clone or fork. */
(1) Either GNU/Linux should no longer follow vfork() if given just `-f'.
But this would break the behavior expected by the users and one would have
to start using `-f -F' instead of the former common `-f'.
(2) or `-F' should get obsoleted and vfork() should get followed just by `-f'.
(3) or the man page should be updated to document it behaves differently on
GNU/Linux vs. other platforms. `-F' should print a warning on GNU/Linux.
(Thanks Dmitry L. for the review, going to follow-up.)
On Thu, Jul 03, 2008 at 05:43:54PM +0200, Jan Kratochvil wrote:
> 2008-07-03 Jan Kratochvil <jan.kratochvil@...>
> Trace even VFORK on -f on all the platforms.
> * strace.1 <-f>: Describe Linux catches new children immediately.
> <-F>: Make the option obsolete. Move the SunOS VFORK comment to the
> `-f' option description.
> * defs.h (followvfork): Declaration removed.
> * strace.c (followvfork): Variable removed.
> (main) <-F>: Merge with the `-f' option.
> (trace): Make !FOLLOWVFORK unconditional.
> * process.c (internal_fork): Make !FOLLOWVFORK unconditional.
OK for me. I did no testing, though.
From: Jan Kratochvil <jan.kratochvil@re...> - 2008-07-24 20:01:39
On Wed, 23 Jul 2008 23:30:10 +0200, Dmitry V. Levin wrote:
> This change unintentionally breaks backwards compatibility:
> -fF now means the same as -ff, and my scripts no longer work.
Yes, I agree, sorry; I find your patch rigt.