OSDN Git Service

(split) LDP: Update original to LDP v3.39.
[linuxjm/LDP_man-pages.git] / original / man2 / ptrace.2
index bb41cfc..8c321e4 100644 (file)
@@ -46,7 +46,7 @@
 .\" FIXME Linux 3.1 adds PTRACE_SEIZE, PTRACE_INTERRUPT,
 .\"                and PTRACE_LISTEN.
 .\"
-.TH PTRACE 2 2012-03-24 "Linux" "Linux Programmer's Manual"
+.TH PTRACE 2 2012-03-30 "Linux" "Linux Programmer's Manual"
 .SH NAME
 ptrace \- process trace
 .SH SYNOPSIS
@@ -114,6 +114,16 @@ The tracer then causes the tracee to continue,
 optionally ignoring the delivered signal
 (or even delivering a different signal instead).
 .LP
+If the
+.B PTRACE_O_TRACEEXEC
+option is not in effect, all successful calls to
+.BR execve (2)
+by the traced process will cause it to be sent a
+.B SIGTRAP
+signal,
+giving the parent a chance to gain control before the new program
+begins execution.
+.LP
 When the tracer is finished tracing, it can cause the tracee to continue
 executing in a normal, untraced mode via
 .BR PTRACE_DETACH .
@@ -124,18 +134,6 @@ determines the action to be performed:
 .TP
 .B PTRACE_TRACEME
 Indicate that this process is to be traced by its parent.
-Any signal (except
-.BR SIGKILL )
-delivered to this process will cause it to stop and its
-parent to be notified via
-.BR waitpid (2).
-In addition, all subsequent calls to
-.BR execve (2)
-by the traced process will cause a
-.B SIGTRAP
-to be sent to it,
-giving the parent a chance to gain control before the new program
-begins execution.
 A process probably shouldn't make this request if its parent
 isn't expecting to trace it.
 .RI ( pid ,
@@ -152,6 +150,8 @@ In the following requests,
 .I pid
 specifies the thread ID of the tracee to be acted on.
 For requests other than
+.B PTRACE_ATTACH
+and
 .BR PTRACE_KILL ,
 the tracee must be stopped.
 .TP