summaryrefslogtreecommitdiff
path: root/strace.1
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2013-02-27 12:15:19 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2013-02-27 12:15:19 +0100
commit22efaf0028ddec8f9ed2a2a11e9baaa201594a33 (patch)
tree8d06c9de8b60b1fa71e65450fe02e13253bc1870 /strace.1
parent9700592e49bd7407c58693f1d397055fa485fc18 (diff)
downloadstrace-22efaf0028ddec8f9ed2a2a11e9baaa201594a33.tar.gz
strace-22efaf0028ddec8f9ed2a2a11e9baaa201594a33.tar.bz2
strace-22efaf0028ddec8f9ed2a2a11e9baaa201594a33.tar.xz
Make -b take SYSCALL param, document it in --help and in manpage.
To not waste an option letter for just one trick, extend -b to take a parameter: "on which syscalls do you want to detach?". Currently supports only execve. While at it, fixed (by removing non-Linux and stale info) and extended manpage text about -f. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'strace.1')
-rw-r--r--strace.144
1 files changed, 24 insertions, 20 deletions
diff --git a/strace.1 b/strace.1
index f31b217..63b604c 100644
--- a/strace.1
+++ b/strace.1
@@ -41,7 +41,9 @@ strace \- trace system calls and signals
.B strace
[\fB-CdffhiqrtttTvVxxy\fR]
[\fB-I\fIn\fR]
-[\fB-e\fIexpr\fR]... [\fB-a\fIcolumn\fR]
+[\fB-b\fIexecve\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... /
@@ -52,7 +54,9 @@ strace \- trace system calls and signals
.B strace
\fB-c\fR[\fBdf\fR]
[\fB-I\fIn\fR]
-[\fB-e\fIexpr\fR]... [\fB-O\fIoverhead\fR]
+[\fB-b\fIexecve\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]
@@ -226,24 +230,16 @@ itself on the standard error.
.B \-f
Trace child processes as they are created by currently traced
processes as a result of the
-.BR fork (2)
-system call.
-.IP
-On non-Linux platforms the new process is
-attached to as soon as its pid is known (through the return value of
-.BR fork (2)
-in the parent process). This means that such children may run
-uncontrolled for a while (especially in the case of a
-.BR vfork (2)),
-until the parent is scheduled again to complete its
-.RB ( v ) fork (2)
-call. On Linux the child is traced from its first instruction with no delay.
-If the parent process decides to
-.BR wait (2)
-for a child that is currently
-being traced, it is suspended until an appropriate child process either
-terminates or incurs a signal that would cause it to terminate (as
-determined from the child's current signal disposition).
+.BR fork (2),
+.BR vfork (2)
+and
+.BR clone (2)
+system calls. Note that
+.B \-p
+.I PID
+.B \-f
+will attach all threads of process PID if it is multi-threaded,
+not only thread with thread_id = PID.
.TP
.B \-ff
If the
@@ -313,6 +309,14 @@ Print paths associated with file descriptor arguments.
.BI "\-a " column
Align return values in a specific column (default column 40).
.TP
+.BI "\-b " syscall
+If specified syscall is reached, detach from traced process.
+Currently, only
+.I execve
+syscall is supported. This option is useful if you want to trace
+multi-threaded process and therefore require -f, but don't want
+to trace its (potentially very complex) children.
+.TP
.BI "\-e " expr
A qualifying expression which modifies which events to trace
or how to trace them. The format of the expression is: