The branch main has been updated by mhorne:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=2ace05b65a2c912888aeec921fc6f990a5c36909

commit 2ace05b65a2c912888aeec921fc6f990a5c36909
Author:     Mitchell Horne <[email protected]>
AuthorDate: 2023-01-28 18:48:33 +0000
Commit:     Mitchell Horne <[email protected]>
CommitDate: 2025-12-04 18:37:18 +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
---
 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 51338fea9bf6..e42fcb7d8f84 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 ac5224b76444..8cc0add54f2e 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

Reply via email to