From nobody Thu May 1 19:51:44 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 4ZpPns3kWdz5vdrC; Thu, 01 May 2025 19:51:45 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZpPns0drmz46hV; Thu, 01 May 2025 19:51:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746129105; 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=I2K5tajaKbKx4wdMle/N/PdXOXVsL4vf8vGDEI0/nVM=; b=pCK+4gPTdxRlHfh62W/NhK1pv9Jsz0gAq10NqfRRTdFUsSfZvod2NRpQcojfGzwVqc70zB r+d8WS2MmY3TlhSq0DhALUGKep+2GPnvEJIXsphBdWygZ/p8i5gLg/9R02E5UWdZ0Aqz0r 856zkQwYF34zVnVi/9RYVgcfRg84TDSm2eqbBRa1JatajmwbwjJIGkUKOjEEoZK3GzYmOA 1udDlaS6a9yMls7YpRTuI3Mdcqu1++S2z/3TtczgCIjVBTxMI3gqltg0vUMa42JvGlJ4bn axlMegHyQoHDS2SECoZKFyU22xMxXRW4ByA2Kd66d8oboDccmDDvUmFGn3AKlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746129105; 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=I2K5tajaKbKx4wdMle/N/PdXOXVsL4vf8vGDEI0/nVM=; b=LL66cIxKS6QtVUqgWwnQwwrIHwSR4iDdjW8kGtJDSPGSfZZax75u9zSRrTgEmeICF9FzH1 MIaVdK9bRSl//beIoELru6L/kSdUq22wnD75dC1Y0PyKvGBzUFIIDEK4SizeiN4jG8bbqV 1tM0SoqkPR/Sknerx4X//OUkGP8PmfT3oocblejmH5BTInSF3vm/dVDCnTw5+hvtnRFCEg CsMg+KUksDNaY4U52fMDCWYGB2q6GUdtLB3KmCST81rvcF2scKO+Gx7cyTaXWX3Dib8NYG 7lseXcl2qmH1IRan1iTo70S6hawMKS+IL8ydeyzId24WxK5dF+SWJ7WVS6dkMQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746129105; a=rsa-sha256; cv=none; b=LtYI9Em9tqxq7uOtLj+n8bhkzn3Wfg5AED2TIPK9xa5uyANe5jQye4ANZKNXd7e2yZlpF5 fStymKoXSx4YgwP/qxQU2zCcBR/cZMjMVHuUfyPFyMoAIK+/72RcwU5Vu8fJ02XMu5U3/t J/YzAn5OlH9JZqbEQE3eRV2L8y96uyC7SZdv4KxjOLAlIn3oTlw1R/cWufiTgdzkfq6Mq9 i0aA6o7xognM4rXriFJuQGWiySLSBgic4n9256BIBh9Xd4KIKcmkjmT2E9uDCRIzsSBnur o5BwCbDKD0rSryYo4Z7/il7KA/x5hyIhdP3gbNkFM4dST883CIukaEu6T0W4nw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZpPnr71TyzjC4; Thu, 01 May 2025 19:51:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 541Jpiag068754; Thu, 1 May 2025 19:51:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 541JpiQV068751; Thu, 1 May 2025 19:51:44 GMT (envelope-from git) Date: Thu, 1 May 2025 19:51:44 GMT Message-Id: <202505011951.541JpiQV068751@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 154ccb0196cd - stable/14 - ps(1): Update some options' conformance/practice comments 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: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 154ccb0196cd56954b976890acf85cdb2b0fd94c Auto-Submitted: auto-generated The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=154ccb0196cd56954b976890acf85cdb2b0fd94c commit 154ccb0196cd56954b976890acf85cdb2b0fd94c Author: Olivier Certner AuthorDate: 2025-04-01 11:45:08 +0000 Commit: Olivier Certner CommitDate: 2025-05-01 19:42:18 +0000 ps(1): Update some options' conformance/practice comments MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D49621 (cherry picked from commit 2d7f70975bd8146f36b35477a8a1be490a0afc95) --- bin/ps/ps.c | 40 +++++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/bin/ps/ps.c b/bin/ps/ps.c index 10ae3924a923..786537a0e959 100644 --- a/bin/ps/ps.c +++ b/bin/ps/ps.c @@ -313,17 +313,24 @@ main(int argc, char *argv[]) break; case 'g': #if 0 - /*- - * XXX - This SUSv3 behavior is still under debate - * since it conflicts with the (undocumented) - * `-g' option. So we skip it for now. + /* + * XXX - This behavior is still under debate since it + * conflicts with the (undocumented) `-g' option + * and is non-standard. However, it is the + * behavior of most UNIX systems except + * SunOS/Solaris/illumos (see next comment; see + * also comment for '-s' below). */ add_list(&pgrplist, optarg); xkeep_implied = 1; nselectors++; break; #else - /* The historical BSD-ish (from SunOS) behavior. */ + /* + * The historical BSD-ish (from SunOS) behavior: Also + * display process group leaders (but we do not filter + * them out). + */ break; /* no-op */ #endif case 'H': @@ -376,7 +383,7 @@ main(int argc, char *argv[]) break; #if 0 case 'R': - /*- + /* * XXX - This un-standard option is still under * debate. This is what SUSv3 defines as * the `-U' option, and while it would be @@ -396,11 +403,13 @@ main(int argc, char *argv[]) break; #if 0 case 's': - /*- - * XXX - This non-standard option is still under - * debate. This *is* supported on Solaris, - * Linux, and IRIX, but conflicts with `-s' - * on NetBSD and maybe some older BSD's. + /* + * XXX - This non-standard option is still under debate. + * It is supported on Solaris, Linux, IRIX, and + * OpenBSD but conflicts with '-s' on NetBSD. This + * is the same functionality as POSIX option '-g', + * but the cited systems do not provide it under + * '-g', only under '-s'. */ add_list(&sesslist, optarg); xkeep_implied = 1; @@ -417,7 +426,12 @@ main(int argc, char *argv[]) nselectors++; break; case 'U': - /* This is what SUSv3 defines as the `-u' option. */ + /* + * POSIX says that '-U' should match on real user IDs, + * not effective ones as we are doing here, which is + * normally the behavior of option '-u' according to the + * standard. + */ add_list(&uidlist, optarg); xkeep_implied = 1; nselectors++; @@ -917,7 +931,7 @@ addelem_pid(struct listinfo *inf, const char *elem) return (1); } -/*- +/* * The user can specify a device via one of three formats: * 1) fully qualified, e.g.: /dev/ttyp0 /dev/console /dev/pts/0 * 2) missing "/dev", e.g.: ttyp0 console pts/0