|author||Konstantin Belousov <kib@FreeBSD.org>||2021-05-18 16:26:22 +0000|
|committer||Konstantin Belousov <kib@FreeBSD.org>||2021-05-25 15:22:34 +0000|
ptrace: add an option to not kill debuggees on debugger exit
Requested by: markj Reviewed by: jhb (previous version) Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differrential revision: https://reviews.freebsd.org/D30351
Diffstat (limited to 'lib/libc')
1 files changed, 26 insertions, 1 deletions
diff --git a/lib/libc/sys/ptrace.2 b/lib/libc/sys/ptrace.2
index 0135db98dc97..504891597dab 100644
@@ -2,7 +2,7 @@
.\" $NetBSD: ptrace.2,v 1.2 1995/02/27 12:35:37 cgd Exp $
.\" This file is in the public domain.
-.Dd May 4, 2021
+.Dd May 20, 2021
.Dt PTRACE 2
@@ -99,6 +99,30 @@ will report a
All other additional signal stops use
.Dv SIGTRAP .
+.Sh DETACH AND TERMINATION
+Normally, exiting tracing process should wait for all pending
+debugging events and then detach from all alive traced processes
+before exiting using
+If tracing process exits without detaching, for instance due to abnormal
+termination, the destiny of the traced children processes is determined
+If the control is set to the default value 1, such traced processes
+If set to zero, kernel implicitly detaches traced processes.
+Traced processes are un-stopped if needed, and then continue the execution
+Kernel drops any
+signals queued to the traced children, which could be either generated by
+not yet consumed debug events, or sent by other means, the later should
+not be done anyway.
+.Sh TRACING EVENTS
Each traced process has a tracing event mask.
An event in the traced process only reports a
@@ -216,6 +240,7 @@ includes only
All other event flags are disabled.
+.Sh PTRACE REQUESTS