From owner-freebsd-standards@FreeBSD.ORG Mon Mar 22 07:59:03 2004 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A798B16A4CE for ; Mon, 22 Mar 2004 07:59:03 -0800 (PST) Received: from mailhost.stack.nl (vaak.stack.nl [131.155.140.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id ED14143D31 for ; Mon, 22 Mar 2004 07:59:02 -0800 (PST) (envelope-from jilles@stack.nl) Received: from turtle.stack.nl (turtle.stack.nl [2001:610:1108:5010:2e0:81ff:fe22:51d8]) by mailhost.stack.nl (Postfix) with ESMTP id 405F0D46#152D81F006; Mon, 22 Mar 2004 16:59:02 +0100 (CET) Received: by turtle.stack.nl (Postfix, from userid 1677) id D9EB01CC2E; Mon, 22 Mar 2004 16:59:01 +0100 (CET) Date: Mon, 22 Mar 2004 16:59:01 +0100 From: Jilles Tjoelker To: Garance A Drosihn Message-ID: <20040322155901.GA17891@stack.nl> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 5.2.1-RELEASE-p1 i386 User-Agent: Mutt/1.5.6i cc: freebsd-standards@FreeBSD.org Subject: Re: PATCH for a more-POSIX `ps', and related adventures X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Mar 2004 15:59:03 -0000 On Sat, Mar 20, 2004 at 03:51:31PM -0500, Garance A Drosihn wrote: > It started out that I just wanted to get rid of one message that > `ps' writes to stderr in -current but not in -stable. "As long as > I was there", I thought I'd add support for a comma-separated list > of processes for `ps -p' (as described in SUSv3). Alexey Dokuchaev > asked if this change got us much closer to POSIX/SUS. Now it did > get us a *little* closer, but in re-reading SUSv3 I realized that > I didn't get it (that one option) quite as close as I would like. > So, "as long as I was there", I figured I should try to come a > little closer. > Now, after about 30 consecutive "as long as I was there" small > projects, I have an update which: > [snip good stuff] > Adds the `-G gidlist' and '-g pgidlist' options of SYSv3. > (note that this replaced a null `-g' option...) Old BSD ps used to exclude process group leaders unless `-g' or `-x' were given. > Adds a `-R ruserlist' option, which is the same as what > SYSv3 describes for `-u' (we already have a `-u'). > Amazingly, none of solaris, linux, or irix seem to > have any kind of `-R' option. SUSv3 says -u selects by effective uid and -U selects by real uid. FreeBSD -U selects by effective uid and -u is something else totally. This is only of the (few) obstacles to SUSv3 (not XSI) compatibility (another being the default selection). XSI level compatibility would require a lot of POLA violation. > [snip] > Fixes interactions between all these "selector options", > & our `-x' option (which is not mentioned in SUSv3). > For the selector options, I tried to meet the > description of: "If any are specified, the default > list shall be ignored and ps shall select the > processes represented by the inclusive OR of all > the selection-criteria options." Hmm, this means the user must add `-x' if `-U', `-s', etc. are used and he wants to see all matching processes. That's not good for writing scripts that should work on both Solaris and FreeBSD, for example. Also, `-U' used to imply `-x' on FreeBSD (it does not on NetBSD). I propose making it so that `-x' is implied when any selector except `-a' is used. > [snip] Jilles Tjoelker