git: 4354f62149b2 - stable/14 - pkill: better document ancestor-hiding
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 21 Jul 2025 02:13:55 UTC
The branch stable/14 has been updated by kevans:
URL: https://cgit.FreeBSD.org/src/commit/?id=4354f62149b23feb7de04f73c46abc13eb34d63b
commit 4354f62149b23feb7de04f73c46abc13eb34d63b
Author: Kyle Evans <kevans@FreeBSD.org>
AuthorDate: 2025-06-24 14:49:31 +0000
Commit: Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2025-07-21 02:12:28 +0000
pkill: better document ancestor-hiding
More prominently note that we'll hide ancestors in the first two
paragraphs that provide an overview of pkill/pgrep. It also seems
worth noting in the description of -a that we won't ever unhide the
pgrep/pkill command itself, as mypid is skipped in all process iteration
by way of PSKIP().
Reviewed by: allanjude, des
Sponsored by: Klara, Inc.
(cherry picked from commit 88a2d48d39d9845e36c8e95a9204001b11e7257e)
---
bin/pkill/pkill.1 | 21 ++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)
diff --git a/bin/pkill/pkill.1 b/bin/pkill/pkill.1
index f06b448b5df8..40abbba96362 100644
--- a/bin/pkill/pkill.1
+++ b/bin/pkill/pkill.1
@@ -27,7 +27,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd October 5, 2020
+.Dd June 24, 2025
.Dt PKILL 1
.Os
.Sh NAME
@@ -71,12 +71,17 @@ The
.Nm pgrep
command searches the process table on the running system and prints the
process IDs of all processes that match the criteria given on the command
-line.
+line, excluding itself and all direct ancestors unless the
+.Fl a
+option is specified.
.Pp
The
.Nm pkill
command searches the process table on the running system and signals all
-processes that match the criteria given on the command line.
+processes that match the criteria given on the command line, excluding itself
+and all direct ancestors unless the
+.Fl a
+option is specified.
.Pp
The following options are available:
.Bl -tag -width ".Fl F Ar pidfile"
@@ -130,6 +135,16 @@ or
process and all of its ancestors are excluded (unless
.Fl v
is used).
+Note that the
+.Fl a
+option will not
+.Dq unhide
+the
+.Nm pgrep
+or
+.Nm pkill
+process itself, even with
+.Fl v .
.It Fl c Ar class
Restrict matches to processes running with specified login class
.Ar class .