From nobody Mon Jul 27 00:30:07 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4h7fcw1TSpz6mBsH for ; Mon, 27 Jul 2026 00:30:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4h7fcv6l11z3FS3 for ; Mon, 27 Jul 2026 00:30:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1785112208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OFPJ5Nr+QVAeOX70f0gNDdhr2LM5n4fyMwolDpNVBXU=; b=e9MwAsSKaJOLq3RiojVrwHG0AXPsOyVQFwDDPDHOCphE3jEWx6Bsph0mIr2Bv4unO7Le7v FvGuIN9NxxrsOK8CRoG62d0LJB/0Iqbro2PjevonfO3WwI9WsA7FJ4ZmqKskb3lxLNHk0a 3+x9bXoqQKizpuXbcunIYBkXrtGZHRH7t/K2nkWfSyxKY0ZZQGH7zb8cpr1cf4iPCxeVmQ aNFldyk73sMdwXFpyqYH9BxtOyAWn5Y3McGvL70cD053VDZW6nVZujC/V9QalQA2zj2g0s tebqlvzzMkQ0vrUjuBS4St+ypnbd8b0MPYHAgXgEvczN8YsLji3FE8y8wDPlHQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1785112208; a=rsa-sha256; cv=none; b=I1OlLxnhqQNNi/lb8/IDhcmp1u+wl4TO7K/kYgiw+b4vKxlOC6TZ0frcrs67i+XZzDOthi ykPGV01h2bugB1x8CSVcWBmBbRFeMEy9S/2QLpG7GqHLxWxi47ppYRzLrTwArz5r3NH/XX qyRM0p8mIhNIA+0W/NZAJ4PLegYUiu3Rr0QadfAse3PH5atljAyqwvjDl4HNSav9y4EeAH PqIZBmvHdKPbtvL//NOVLkIareurWd/nRNhu3l/QbUlie6a3sJILZJjEXrbGfaM9DBMvBA vMCcpDnk2sKNZ7qPsbTKu9NbPhg+6IpGJ+ADEpXVKesQ/O0ORBvSAfcq//B3CA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1785112208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OFPJ5Nr+QVAeOX70f0gNDdhr2LM5n4fyMwolDpNVBXU=; b=du5Nn+TKSgS0+xddKG2O6eRmV6CrGkOOGNq3XmGyvWY4ldSbkORstMzY5a9WsSVc3T7WKx y97FDhQYAhZFA/8cFXTeL90DsF4l8ZbNyzsuPNPrN7+kU/rShwmhvmuZhmmBUUY6nBWb72 /TSS/VS3dSaX5BEzzlKGBkRdbpno7aQjr52LBvR+K+kOMqefz/B4A++td+fo1iExCUtBFo c5fS0j6Z1AiL14S1GIoclY0BN7N6DdNay2H/1QZeH4/lwpYGv6jmI5zT2vk3hRM5v/Bxp/ lUcdrxXR3FLp5PkrSmA5/gk9YXmHYiT5EHRcSFZnQZxd7bJ5ryB/DIsx/vMVpg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4h7fcv5nXZzls0 for ; Mon, 27 Jul 2026 00:30:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31082 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 27 Jul 2026 00:30:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 4c6c49af2dee - stable/15 - ptrace.2: document PT_GET_CHILDREN List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 4c6c49af2deef5befcb71bc77a4f4e9ed2fac55a Auto-Submitted: auto-generated Date: Mon, 27 Jul 2026 00:30:07 +0000 Message-Id: <6a66a68f.31082.470e6f1f@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=4c6c49af2deef5befcb71bc77a4f4e9ed2fac55a commit 4c6c49af2deef5befcb71bc77a4f4e9ed2fac55a Author: Konstantin Belousov AuthorDate: 2026-07-17 20:12:13 +0000 Commit: Konstantin Belousov CommitDate: 2026-07-27 00:28:42 +0000 ptrace.2: document PT_GET_CHILDREN (cherry picked from commit 6dbeaf1afaba52ba224f24773cbaac6317e11ff2) --- lib/libsys/ptrace.2 | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/lib/libsys/ptrace.2 b/lib/libsys/ptrace.2 index e1739a56e115..cedcf92cbef1 100644 --- a/lib/libsys/ptrace.2 +++ b/lib/libsys/ptrace.2 @@ -1044,6 +1044,61 @@ Result of the execution is returned in the member. Note that the request and its result do not affect the returned value from the currently executed syscall, if any. +.It Dv PT_GET_CHILDREN +Returns a report describing the children of the process specified by +.Fa pid . +Only children visible to the current thread are reported. +.Pp +If the +.Fa addr +argument is +.Dv NULL , +the instantaneous number of children is returned as +the result of the request. +.Pp +If the +.Fa addr +argument is not +.Dv NULL , +it must point to the array of +.Bd -literal +struct ptrace_child { + pid_t pid; + int flags; +}; +.Ed +elements. +The size of the array in bytes must be passed in +.Fa data . +The +.Dv PT_GET_CHILDREN +implementation fills the array and returns the number of elements filled. +.Pp +For each element, the +.Va pid +member contains the PID of the corresponding child. +The +.Va flags +member may have the following flags set: +.Bl -tag -width PTCHLD_TRACED_BY_ME +.It Dv PTCHLD_TRACED +The child specified by the +.Va pid +member is traced. +.It Dv PTCHLD_TRACED_BY_ME +The child specified by the +.Va pid +member is traced +by the caller (not the +process specified by the +.Fa pid +argument to the function). +.It Dv PTCHLD_EXITED +The child process is exiting or is a zombie. +.It Dv PTCHLD_ORPHAN +The child process is currently being debugged by a process other +than its parent process. +.El .El .Sh PT_COREDUMP and PT_SC_REMOTE usage The process must be stopped before dumping or initiating a remote system call.