]> granicus.if.org Git - strace/commitdiff
Tweak help text and manpage (added -In to manpage)
authorDenys Vlasenko <vda.linux@googlemail.com>
Mon, 26 Mar 2012 11:10:50 +0000 (13:10 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Mon, 26 Mar 2012 11:10:50 +0000 (13:10 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
strace.1
strace.c

index 2790414f685cbee5f7d86553b9755fc4a28a622b..89cd7231c88fba694a17da1e820f80dd4fdffc77 100644 (file)
--- a/strace.1
+++ b/strace.1
 strace \- trace system calls and signals
 .SH SYNOPSIS
 .B strace
-[
-.B \-CdDffhiqrtttTvxxy
-]
-[
-.BI \-a column
-]
-[
-.BI \-e expr
-]
-\&...
-[
-.BI \-o file
-]
-[
-.BI \-p pid
-]
-\&...
-[
-.BI \-P path
-]
-\&...
-[
-.BI \-s strsize
-]
-[
-.BI \-u username
-]
-[
-.BI \-E var=val
-]
-\&...
-[
-.BI \-E var
-]
-\&...
-[
-.I command
-[
-.I arg
-\&...
-]
-]
+[\fB-CdffhiqrtttTvVxxy\fR]
+[\fB-I\fIn\fR]
+[\fB-e\fIexpr\fR]... [\fB-a\fIcolumn\fR]
+[\fB-o\fIfile\fR]
+[\fB-s\fIstrsize\fR]
+[\fB-P\fIpath\fR]... \fB-p\fIpid\fR... /
+[\fB-D\fR]
+[\fB-E\fIvar\fR[=\fIval\fR]]... [\fB-u\fIusername\fR]
+\fIcommand\fR [\fIargs\fR]
 .sp
 .B strace
-.B \-c
-[
-.B \-D
-]
-[
-.BI \-e expr
-]
-\&...
-[
-.BI \-O overhead
-]
-[
-.BI \-S sortby
-]
-[
-.I command
-[
-.I arg
-\&...
-]
-]
+\fB-c\fR[\fBdf\fR]
+[\fB-I\fIn\fR]
+[\fB-e\fIexpr\fR]... [\fB-O\fIoverhead\fR]
+[\fB-S\fIsortby\fR] \fB-p\fIpid\fR... /
+[\fB-D\fR]
+[\fB-E\fIvar\fR[=\fIval\fR]]... [\fB-u\fIusername\fR]
+\fIcommand\fR [\fIargs\fR]
 .SH DESCRIPTION
 .IX "strace command" "" "\fLstrace\fR command"
 .LP
@@ -500,6 +453,13 @@ Note that this is independent from the normal tracing of the
 system call which is controlled by the option
 .BR -e "\ " trace = write .
 .TP
+.BI "\-I " interruptible
+When strace can be interrupted by signals (such as pressing ^C).
+1: no signals are blocked; 2: fatal signals are blocked while decoding syscall
+(default); 3: fatal signals are always blocked (default if '-o FILE PROG');
+4: fatal signals and SIGTSTP (^Z) are always blocked (useful to make
+strace -o FILE PROG not stop on ^Z).
+.TP
 .BI "\-o " filename
 Write the trace output to the file
 .I filename
index c211ac73ad1a2ea18cd84cdc1af7b09dbca93732..28cc6ddfae9f30dd448a6dac5c305e9d6c030ac8 100644 (file)
--- a/strace.c
+++ b/strace.c
@@ -184,35 +184,34 @@ static void
 usage(FILE *ofp, int exitval)
 {
        fprintf(ofp, "\
-usage: strace [-CdDffhiqrtttTvVxxy] [-I n] [-a column] [-e expr]... [-o file]\n\
-              [-p pid]... [-s strsize] [-u username] [-E var=val]...\n\
-              [-P path] [PROG [ARGS]]\n\
-   or: strace -c [-D] [-I n] [-e expr]... [-O overhead] [-S sortby] [-E var=val]...\n\
-              [PROG [ARGS]]\n\
+usage: strace [-CdffhiqrtttTvVxxy] [-I n] [-e expr]...\n\
+              [-a column] [-o file] [-s strsize] [-P path]...\n\
+              -p pid... / [-D] [-E var=val]... [-u username] PROG [ARGS]\n\
+   or: strace -c[df] [-I n] [-e expr]... [-O overhead] [-S sortby]\n\
+              -p pid... / [-D] [-E var=val]... [-u username] PROG [ARGS]\n\
 -c -- count time, calls, and errors for each syscall and report summary\n\
--C -- like -c but also print regular output while processes are running\n\
+-C -- like -c but also print regular output\n\
 -d -- enable debug output to stderr\n\
 -D -- run tracer process as a detached grandchild, not as parent\n\
 -f -- follow forks, -ff -- with output into separate files\n\
 -F -- attempt to follow vforks (deprecated, use -f)\n\
 -i -- print instruction pointer at time of syscall\n\
--I interruptible\n\
-   1: no signals are blocked\n\
-   2: fatal signals are blocked while decoding syscall (default)\n\
-   3: fatal signals are always blocked (default if '-o FILE PROG')\n\
-   4: fatal signals and SIGTSTP (^Z) are always blocked\n\
-      (useful to make 'strace -o FILE PROG' not stop on ^Z)\n\
 -q -- suppress messages about attaching, detaching, etc.\n\
 -r -- print relative timestamp, -t -- absolute timestamp, -tt -- with usecs\n\
 -T -- print time spent in each syscall\n\
 -v -- verbose mode: print unabbreviated argv, stat, termios, etc. args\n\
 -x -- print non-ascii strings in hex, -xx -- print all strings in hex\n\
 -y -- print paths associated with file descriptor arguments\n\
--h -- print help message\n\
--V -- print version\n\
+-h -- print help message, -V -- print version\n\
 -a column -- alignment COLUMN for printing syscall results (default %d)\n\
 -e expr -- a qualifying expression: option=[!]all or option=[!]val1[,val2]...\n\
    options: trace, abbrev, verbose, raw, signal, read, or write\n\
+-I interruptible --\n\
+   1: no signals are blocked\n\
+   2: fatal signals are blocked while decoding syscall (default)\n\
+   3: fatal signals are always blocked (default if '-o FILE PROG')\n\
+   4: fatal signals and SIGTSTP (^Z) are always blocked\n\
+      (useful to make 'strace -o FILE PROG' not stop on ^Z)\n\
 -o file -- send trace output to FILE instead of stderr\n\
 -O overhead -- set overhead for tracing syscalls to OVERHEAD usecs\n\
 -p pid -- trace process with process id PID, may be repeated\n\
@@ -1497,13 +1496,13 @@ init(int argc, char *argv[])
                        break;
                case 'c':
                        if (cflag == CFLAG_BOTH) {
-                               error_msg_and_die("-c and -C are mutually exclusive options");
+                               error_msg_and_die("-c and -C are mutually exclusive");
                        }
                        cflag = CFLAG_ONLY_STATS;
                        break;
                case 'C':
                        if (cflag == CFLAG_ONLY_STATS) {
-                               error_msg_and_die("-c and -C are mutually exclusive options");
+                               error_msg_and_die("-c and -C are mutually exclusive");
                        }
                        cflag = CFLAG_BOTH;
                        break;
@@ -1619,14 +1618,14 @@ init(int argc, char *argv[])
                usage(stderr, 1);
 
        if (nprocs != 0 && daemonized_tracer) {
-               error_msg_and_die("-D and -p are mutually exclusive options");
+               error_msg_and_die("-D and -p are mutually exclusive");
        }
 
        if (!followfork)
                followfork = optF;
 
        if (followfork >= 2 && cflag) {
-               error_msg_and_die("(-c or -C) and -ff are mutually exclusive options");
+               error_msg_and_die("(-c or -C) and -ff are mutually exclusive");
        }
 
        /* See if they want to run as another user. */