Bug 283091 - pfind(9) man page outdated
Summary: pfind(9) man page outdated
Status: New
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-03 10:26 UTC by Yan-Hao Wang
Modified: 2024-12-03 10:35 UTC (History)
1 user (show)

See Also:


Attachments
The patch (1.52 KB, patch)
2024-12-03 10:26 UTC, Yan-Hao Wang
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yan-Hao Wang 2024-12-03 10:26:30 UTC
Created attachment 255594 [details]
The patch

The pfind(9) manual page in FreeBSD contains outdated content, such as references to zpfind() and the zombproc list, which have already been removed.

Relevant commits include [2319489](https://github.com/freebsd/freebsd-src/commit/2319489b6e506645f996300db2d39861a1906357) (remove zpfind) and [88cc62e](https://github.com/freebsd/freebsd-src/commit/88cc62e5a53bb1b65416bd4a40e6b6c2981fcc38#diff-9d0eeaa1ed0362df667f09d9c453699a70544055a199038d03a68da9f8d9b39dR986) (remove zombproc).

Instead, there are new functions available for process search, as defined in [sys/sys/proc.h#L1093](https://github.com/freebsd/freebsd-src/blob/4b4e88d9425b59a377a71ffeb553376b1c60a80e/sys/sys/proc.h#L1093):

1. pfind_any(): Finds a process (including zombies) by its ID.
2. pfind_any_locked(): Finds a process by its ID liek pfind but don’t lock the process hash bucket. It assert the process hash bucket is lock or not.

In the current FreeBSD implementation, the allproc list is used, and the `p->p_state` field can determine whether a process is a zombie or not.

I have attempted to revise the pfind(9) manual page as shown in my patch. However, since English is not my native language, the documentation team may need to refine my patch or not use it. My primary goal is to highlight the outdated content for correction.

This patch addresses several versions greater than the 13.3 release.
Comment 1 Yan-Hao Wang 2024-12-03 10:34:03 UTC
Related bug: bug #283093