Module Name:    src
Committed By:   martin
Date:           Tue Oct 15 19:13:22 UTC 2019

Modified Files:
        src/lib/libc/sys [netbsd-9]: ptrace.2

Log Message:
Pull up following revision(s) (requested by kamil in ticket #326):

        lib/libc/sys/ptrace.2: revision 1.81

Document PT_STOP, update PT_KILL in the ptrace(2) man-page
Formatting by <mgorny>


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.79.2.1 src/lib/libc/sys/ptrace.2

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/sys/ptrace.2
diff -u src/lib/libc/sys/ptrace.2:1.79 src/lib/libc/sys/ptrace.2:1.79.2.1
--- src/lib/libc/sys/ptrace.2:1.79	Thu Jul 11 03:30:01 2019
+++ src/lib/libc/sys/ptrace.2	Tue Oct 15 19:13:22 2019
@@ -1,7 +1,7 @@
-.\"	$NetBSD: ptrace.2,v 1.79 2019/07/11 03:30:01 mgorny Exp $
+.\"	$NetBSD: ptrace.2,v 1.79.2.1 2019/10/15 19:13:22 martin Exp $
 .\"
 .\" This file is in the public domain.
-.Dd July 11, 2019
+.Dd October 9, 2019
 .Dt PTRACE 2
 .Os
 .Sh NAME
@@ -249,9 +249,37 @@ ID of the thread to be resumed, and only
 .It Dv PT_KILL
 The traced process terminates, as if
 .Dv PT_CONTINUE
-had been used with
+has been used with
 .Dv SIGKILL
 given as the signal to be delivered.
+However, unlike
+.Dv PT_CONTINUE ,
+.Dv PT_KILL
+can be used on a non-stopped tracee.
+The
+.Fa addr
+and
+.Fa data
+arguments are ignored.
+.It Dv PT_STOP
+The traced process stops, as if
+.Xr kill
+has been used with
+.Dv SIGSTOP
+given as the signal to be delivered.
+.Xr wait 2
+will report the child (again) as stopped even if it was stopped before.
+The
+.Fa addr
+and
+.Fa data
+arguments are ignored.
+Unlike
+.Dv PT_CONTINUE
+call with
+.Dv SIGSTOP ,
+.Dv PT_STOP
+works both on running and stopped processes.
 .It Dv PT_ATTACH
 This request allows a process to gain control of an otherwise unrelated
 process and begin tracing it.

Reply via email to