From nobody Thu Dec 11 21:02:19 2025 X-Original-To: dev-commits-src-all@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 4dS4lv1qQSz6KMds for ; Thu, 11 Dec 2025 21:02:19 +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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dS4lv10hkz3hQ6 for ; Thu, 11 Dec 2025 21:02:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765486939; 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=mPWU+spBOPLQZm6lW8AgT1Ku6RBgLXQNf7EiZqIZnLM=; b=yV8R6E9hpe1yGKcNv/U+DZmDMj9y7KjBk7Ho/68u2OXzzTYrbUjx+umqYjZNZwZP6cbY3Z YRTm/noviFw4iAQ/8VqOR6aDoLa9QsRk25K8q1/NJ7DoblzKwWCvryNxHU3Xhh6b7/Xxnd WSvtc3C53QPTHWxh2VEz3exaZ6c1IsluZW4AQ15VXJII8lr3qlmQiEE7dffcHu59JZq35Y naRSRkB4WUmaKZYUa8Rp+Zba2lWhdEXz5eB3O95NUiiICpXSdQprqcVYmMIA0YHo69ftVe BGuYf41djKuzFah+IthPgIKGhrH2Y7mKv6QXO/VjoOyDuqNDTGMBdi6iHXLUPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765486939; 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=mPWU+spBOPLQZm6lW8AgT1Ku6RBgLXQNf7EiZqIZnLM=; b=iiXVmz0c1g50Jl4dr1cOA6q7mVk31FdLwkBbj9uUog4gbKEJ+Glw3ZjRd+FMivvCJf+7CG bcG7SKSbah+g3H1EnT7cann2NZlcpbobY7+gHLJREPm4DEcuUmCv3exTlQ5Bdl4KzbWBYr JgJHomgPt7aqlXsoG1pXHk8nPyD5on9HwtJuHazfzf1UzETBXuxBvr/6oNomGtgaHXSGNN ciecQeXiyt53GGhvj7Xbpaf3pTv6BFkGjl0mpvbhRwqg4xJVr7njvu8mL/giNNuHbSjJpO /gJSanMJE1qLPtPQZ+MCLzlXIiUkxtWei56oNOq7AvdwuspsJw2IbToDCGFPSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765486939; a=rsa-sha256; cv=none; b=KZ65kD+u+l+u1D9sFrM7W9kLP22ppJ69UIeHt/zCqk2ozy979Ae84pSoMgGAZ8nyqsX26o 4QdmlMQ259TNp2sMnF9vSONHwkCDEsnM76uBxvXz3UAe5aorHT2SlvLTGSdf1doW7kqvjq ATeOkx56QHvSZPi9eZocnIqzBgw6GKCGKUF0arI5zjj8PRH50/mbL5PfdTDkt2tFupKP/S EJFbTTxYIpY/Icg6VLi6SP5TbM2QjxPPGXCCRFwfpYe+RR3CRS+gYBi7j8BSuIWKLk52vx M03FHo3o+ihdC3uL1npKMxobG2j/woEgyVxZVtEzRIzdYDX0bVtJzESUHoiDrg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dS4lv0DpSznb1 for ; Thu, 11 Dec 2025 21:02:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32b3f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 11 Dec 2025 21:02:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 5588350cf9d4 - stable/15 - pfind(9): follow-up fixes and improvements List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 5588350cf9d40bec254708097bfa26f0c429d9c1 Auto-Submitted: auto-generated Date: Thu, 11 Dec 2025 21:02:19 +0000 Message-Id: <693b315b.32b3f.53a095b6@gitrepo.freebsd.org> The branch stable/15 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=5588350cf9d40bec254708097bfa26f0c429d9c1 commit 5588350cf9d40bec254708097bfa26f0c429d9c1 Author: Mitchell Horne AuthorDate: 2023-01-28 18:48:33 +0000 Commit: Mitchell Horne CommitDate: 2025-12-11 21:02:12 +0000 pfind(9): follow-up fixes and improvements (Found on a branch from a year ago.) - Adjust NAMEs - MLINKS: add pfind_any.9, pfind_any_locked.9; remove old zpfind.9 - Reword the description of pfind_any() so that it doesn't imply only zombie processes are returned - Fix a comma - Use .Dv for the macro PRS_ZOMBIE - Move the (logically separate) final statement to a new paragraph - .Xr to pget(9) Reviewed by: 0mp Fixes: 07d78399eb79 ("pfind(9): Update to recent behavior") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D53548 (cherry picked from commit 2ace05b65a2c912888aeec921fc6f990a5c36909) --- ObsoleteFiles.inc | 3 +++ share/man/man9/Makefile | 3 ++- share/man/man9/pfind.9 | 34 +++++++++++++++++----------------- 3 files changed, 22 insertions(+), 18 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 0a35f9c33f8b..8b08bc5ff496 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20251204: zpfind.9 alias to pfind.9 removed +OLD_FILES+=usr/share/man/man9/zpfind.9 + # 20251121: Remove duplicate pam_krb5 manual page OLD_FILES+=usr/share/man/man8/pam-krb5.8.gz diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 11557907d5fe..2ecc511c8523 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1853,7 +1853,8 @@ MLINKS+=pfil.9 pfil_add_hook.9 \ pfil.9 pfil_remove_hook.9 \ pfil.9 pfil_run_hooks.9 \ pfil.9 pfil_link.9 -MLINKS+=pfind.9 zpfind.9 +MLINKS+=pfind.9 pfind_any.9 \ + pfind.9 pfind_any_locked.9 MLINKS+=PHOLD.9 PRELE.9 \ PHOLD.9 _PHOLD.9 \ PHOLD.9 _PRELE.9 \ diff --git a/share/man/man9/pfind.9 b/share/man/man9/pfind.9 index ebcf7a565150..298b6b3ef326 100644 --- a/share/man/man9/pfind.9 +++ b/share/man/man9/pfind.9 @@ -22,11 +22,13 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 3, 2024 +.Dd November 3, 2025 .Dt PFIND 9 .Os .Sh NAME -.Nm pfind , zpfind +.Nm pfind , +.Nm pfind_any , +.Nm pfind_any_locked .Nd locate a process by number .Sh SYNOPSIS .In sys/param.h @@ -38,16 +40,13 @@ .Ft "struct proc *" .Fn pfind_any_locked "pid_t pid" .Sh DESCRIPTION +The .Fn pfind -takes a -.Fa pid -as its argument and returns a pointer to the -.Vt proc -structure whose PID is specified in the argument only if the -.Fa pid -is on the -.Va allproc -list. +function walks the list of processes in the system, looking for the one with a +process ID of +.Fa pid . +If the process exists, and is not in the zombie state, a pointer to the process +structure will be returned. .Pp .Fn pfind_any takes a @@ -56,21 +55,21 @@ as its argument. .Fn pfind_any searches the .Va allproc -list and returns the first process whose PID matches and whose state is -.Va PRS_ZOMBIE . +list and returns the first process with a matching PID, whose state may be +.Dv PRS_ZOMBIE . .Pp .Fn pfind_any_locked is similar to -.Fn pfind_any -,but it does not lock the process hash bucket -for the given +.Fn pfind_any , +but it does not lock the process hash bucket for the given .Vt pid . Instead, it asserts the corresponding process hash bucket is already locked. +.Pp All three functions .Fn pfind , .Fn pfind_any , and -.Fn pgfind_any_locked +.Fn pfind_any_locked lock the .Vt proc structure before returning. @@ -85,6 +84,7 @@ structure on success or .Dv NULL on failure. .Sh SEE ALSO +.Xr pget 9 , .Xr pgfind 9 .Sh AUTHORS This manual page was written by