Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 May 2025 12:42:39 GMT
From:      Olivier Certner <olce@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: eed005b57895 - releng/14.3 - RELNOTES: ps(1): Document change in behavior for '-a'/'-A'
Message-ID:  <202505131242.54DCgdYR072591@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch releng/14.3 has been updated by olce:

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

commit eed005b578954025bd2e4bab47d3c37f8d6c1e9c
Author:     Olivier Certner <olce@FreeBSD.org>
AuthorDate: 2025-05-06 13:42:33 +0000
Commit:     Olivier Certner <olce@FreeBSD.org>
CommitDate: 2025-05-13 12:41:26 +0000

    RELNOTES: ps(1): Document change in behavior for '-a'/'-A'
    
    Document the practical consequence of change "ps(1): Make '-a' and '-A'
    always show all processes" (93a94ce731a8) that specifying '-a'/'-A'
    leads to printing all processes regardless of the presence of other
    process selection options (except for '-x'/'-X', which command
    a filter).
    
    While here, mention a possible practical issue with '-J', as reported by
    dch@.  This option was introduced by commit "Add -J to filter by
    matching jail IDs and names." (13767130c7147ae7182a, r265229), which
    unfortunately talked about '-J' being a filter while actually
    implementing it as a regular selection option which adds to the
    processes to display.
    
    Reviewed by:    dch
    MFC after:      1 day
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D50193
    
    (cherry picked from commit 428200d2f0689aa801f5cab15d3066e2c77825f5)
    
    Commit hash edited on MFC.
    
    (cherry picked from commit f18a49a747f7641e93c24d50207d54e7e612f97d)
    
    Approved by:    re (cperciva)
---
 RELNOTES | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/RELNOTES b/RELNOTES
index 82c0aacd97ee..838833f8db89 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -10,6 +10,23 @@ newline.  Entries should be separated by a newline.
 
 Changes to this file should not be MFCed.
 
+1ee62f354ab0:
+	ps(1)'s options '-a' and '-A', when combined with any other one
+	affecting the selection of processes except for '-X' and '-x', would
+	have no effect, in contradiction with the rule that one process is
+	listed as soon as any of the specified options selects it (inclusive
+	OR), which is both mandated by POSIX and arguably a natural expectation.
+	This bug has been fixed.
+
+	As a practical consequence, specifying '-a'/'-A' now causes all
+	processes to be listed regardless of other selection options (except for
+	'-X' and '-x', which still apply).  In particular, to list only
+	processes from specific jails, one must not use '-a' with '-J'.  Option
+	'-J', contrary to its apparent initial intent, never worked as a filter
+	in practice (except by accident with '-a' due to the bug), but instead
+	as any other selection options (e.g., '-U', '-p', '-G', etc.) subject to
+	the "inclusive OR" rule.
+
 a2132d91739d:
 	ps(1)'s '-U' option has been changed to select processes by their real
 	user IDs instead of their effective one, in accordance with POSIX and



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202505131242.54DCgdYR072591>