summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--strace.14
-rw-r--r--strace.c7
2 files changed, 10 insertions, 1 deletions
diff --git a/strace.1 b/strace.1
index 31c0a98..aa79d6e 100644
--- a/strace.1
+++ b/strace.1
@@ -220,7 +220,8 @@ Here the second argument represents the full set of all signals.
.B \-c
Count time, calls, and errors for each system call and report a summary on
program exit. On Linux, this attempts to show system time (CPU time spent
-running in the kernel) independent of wall clock time.
+running in the kernel) independent of wall clock time. If -c is used with
+-f or -F (below), only aggregate totals for all traced processes are kept.
.TP
.B \-d
Show some debugging output of
@@ -254,6 +255,7 @@ If the
option is in effect, each processes trace is written to
.I filename.pid
where pid is the numeric process id of each process.
+This is incompatible with -c, since no per-process counts are kept.
.TP
.B \-F
Attempt to follow
diff --git a/strace.c b/strace.c
index 95ab48d..1553fb5 100644
--- a/strace.c
+++ b/strace.c
@@ -314,6 +314,13 @@ char *argv[];
if ((optind == argc) == !pflag_seen)
usage(stderr, 1);
+ if (followfork > 1 && cflag) {
+ fprintf(stderr,
+ "%s: -c and -ff are mutually exclusive options\n",
+ progname);
+ exit(1);
+ }
+
/* See if they want to run as another user. */
if (username != NULL) {
struct passwd *pent;