From nobody Mon Apr 28 12:23:36 2025 X-Original-To: dev-commits-src-main@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 4ZmN0939XTz5vHlS; Mon, 28 Apr 2025 12:23:37 +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 4ZmN0854nhz3gN0; Mon, 28 Apr 2025 12:23:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1745843016; 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=md4yl44wSRChWtZTXft4eaeZSaMehE4MB1R6jtpxSQ0=; b=JwVeXEMelt0/LUYTyJkGSCs7WJUZ8rhnjxQQESVhdyvmFqWfxVD7dXPsPkE2NrhNjakiOY gyo5kcCS61hr1uiQRBjj1AirEQ0/mC4mpbl3r/85SzMWUBMd1LZ7kYjb8KCbEfrA7cSrjx 66onDcW+PuKgW5Yp2nX5pqO57o0SgpGEh4wwgYRpUiXpGPzUu9iEEDUEiL3/FnljxRlXK7 z5hgVUWjDoPxmOLiogtKWwFecyRO/9Ma9nkfvuxFbb6p5eKqBecKN4Wm65IERkOD7e7RNW EgLNJQOLui/cp0nAQfvgpaMsTEXKegCElzHQh1LsUGZUzrlgMDJaPCh+xkaS9g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1745843016; a=rsa-sha256; cv=none; b=QCZFCKY2Uz0o/zIN7wlVtfznqNpv04Q8umJQshRBjwyLxltW6EAOLSHtBZX2yQQj2jCbrb Bl+keLGKAO/6KsD/c1QeZ7IO+Tm8jMnvXpbdRUOH/2VCOFU1yvRUIbGOYfXAYd86/E9IzA RAu+bM27EhZMoV1Tt2iSmcIQp7N0Q3B63M6xN7QrkyMfZ9w1dsEAcKi/qC1DxeH1Nl70X8 aPLZx3rgYqzsK5mb9oHQzg9sX4dDMV2UNih1QJVJl1Jub4MzcqWXfZKpP1fqQzZUe4Eq8H QYi07ruJV/6lGFBnaAXmjdEBHJw3ThHXl8vhBHqL0K1/RQp9SgwhkT51HqMX5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1745843016; 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=md4yl44wSRChWtZTXft4eaeZSaMehE4MB1R6jtpxSQ0=; b=GLjXWNyWwBc1aOb+wp2AsImUh6mDtaYYIklFd7q95+zTTYkuDNlbj7vH/V+0mpuPFZ9DBk lBgmUnMxgfDuAuAJBseaKFnWuOkcs94x+vop66D7jv7Wx6dw/xisQ3zkMI+PdAQFbQZo4w 7ZX5sIh3cmYYH17kppMaZaFCXZpqmCZk9t2GD5Zy/7rH1H7jSj9CGp5s8+QaCMuuKBRM0f SltOYvGCX8qWImn8P6VrhA9sL+5ZsULex5TsvIKlvRalwFtfFQA13q19g7mHAtXiBYbXsK HoLT55rB/m/cEfcSK57fWFgO6Z8vagu/v0WRNYuNo1twLlziFeLOBK3M/iJ4GQ== 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 4ZmN084ZYmzbvp; Mon, 28 Apr 2025 12:23:36 +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 53SCNaU9025655; Mon, 28 Apr 2025 12:23:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 53SCNahc025652; Mon, 28 Apr 2025 12:23:36 GMT (envelope-from git) Date: Mon, 28 Apr 2025 12:23:36 GMT Message-Id: <202504281223.53SCNahc025652@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 2d7f70975bd8 - main - ps(1): Update some options' conformance/practice comments List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 2d7f70975bd8146f36b35477a8a1be490a0afc95 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=2d7f70975bd8146f36b35477a8a1be490a0afc95 commit 2d7f70975bd8146f36b35477a8a1be490a0afc95 Author: Olivier Certner AuthorDate: 2025-04-01 11:45:08 +0000 Commit: Olivier Certner CommitDate: 2025-04-28 12:18:26 +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 --- 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 bb79c6c9af84..6c007e8fc1a1 100644 --- a/bin/ps/ps.c +++ b/bin/ps/ps.c @@ -288,17 +288,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': @@ -351,7 +358,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 @@ -371,11 +378,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; @@ -392,7 +401,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++; @@ -892,7 +906,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