2008-07-03 Jan Kratochvil <jan.kratochvil@redhat.com>
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.
diff --git a/strace.c b/strace.c
index 341ed04..0cbe322 100644
--- a/strace.c
+++ b/strace.c
@@ -78,7 +78,7 @@
#endif
#endif
-int debug = 0, followfork = 0, followvfork = 0;
+int debug = 0, followfork = 0;
int dtime = 0, cflag = 0, xflag = 0, qflag = 0;
static int iflag = 0, interactive = 0, pflag_seen = 0, rflag = 0, tflag = 0;
@@ -659,12 +659,11 @@
case 'd':
debug++;
break;
+ case 'F':
+ /* Obsoleted, acts as `-f'. */
case 'f':
followfork++;
break;
- case 'F':
- followvfork++;
- break;
case 'h':
usage(stdout, 0);
break;
@@ -2261,7 +2260,7 @@
/* Look up `pid' in our table. */
if ((tcp = pid2tcb(pid)) == NULL) {
#ifdef LINUX
- if (followfork || followvfork) {
+ if (followfork) {
/* This is needed to go with the CLONE_PTRACE
changes in process.c/util.c: we might see
the child's initial trap before we see the