From owner-freebsd-standards@FreeBSD.ORG Thu Mar 25 15:10:28 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 8562716A4CE for ; Thu, 25 Mar 2004 15:10:28 -0800 (PST) Received: from smtp3.server.rpi.edu (smtp3.server.rpi.edu [128.113.2.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 17F9643D39 for ; Thu, 25 Mar 2004 15:10:28 -0800 (PST) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp3.server.rpi.edu (8.12.8/8.12.8) with ESMTP id i2PNAQLP018026; Thu, 25 Mar 2004 18:10:27 -0500 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <1080252862.2255.1141.camel@cube> References: <1080165171.2232.910.camel@cube> <20040325191745.GB71731@stack.nl> <1080247208.2232.1095.camel@cube> <1080252862.2255.1141.camel@cube> Date: Thu, 25 Mar 2004 18:10:25 -0500 To: Albert Cahalan From: Garance A Drosihn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: CanIt (www . canit . ca) 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: Thu, 25 Mar 2004 23:10:28 -0000 At 5:14 PM -0500 3/25/04, Albert Cahalan wrote: >On Thu, 2004-03-25 at 16:07, Garance A Drosihn wrote: >> At 3:40 PM -0500 3/25/04, Albert Cahalan wrote: >> > > > >Also, I'd be happy to support a FreeBSD-compatible "Z" if > > >you can properly describe it to me. > > > > This description from the source might help (since I have > > not written the man-page entry for it yet. Ahem...): > >'Z' != 'X' Oops. That just shows what happens when I don't get enough sleep! `ps -Z' is an option which modifies the output format to add a column called "LABEL". It is only in 5.x, and looking at the code I am not sure that it interacts all that well with the other `-o' options. But if you specify `-Z' before any other output-option, then this LABEL column shows up as the first column of output. What it shows is the MAC (Mandatory Access Control) label for processes. All my processes show up with a blank LABEL field, because I'm not actually doing anything with MAC's yet. I know very little about MAC-support. Perhaps the following will help: http://www.freebsd.org/cgi/man.cgi?query=lomac&manpath=FreeBSD+5.2-current >Thanks for the "X" info though. Supporting "X" this way >would be seriously hard for me. I'd be happy enough if you just treated it as a no-op :-). >I suppose the whole point is to filter processes out >of the listed selections? The point is just to have a reverse of -x. I really wanted options like '-G' to *not* show these processes by default, but someone pointed out that doing that would be incompatible with how other OS's handle those options. But in BSD-land, a `ps' all by itself defaults to what I'm calling `-X' (which is why we have a `-x' option in the first place). >This seems to be quite a bit of complexity for little gain. We already have -x. Adding -X is almost zero complexity in our code path. Most of the update for it is just that block of comments which I sent in my previous message. >It looks like you're headed toward something that might >best be done like: > ps --match="ruid in 1,1000,1082 && tty!=NOTTY" Uh, now adding *THAT* would add a huge amount of complexity to our `ps'! Wow! >(instead of approaching it hack-by-hack over the years) Well, I do not picture a series of similar hacks. I am just trying to make some sense out of our already-existing `-x' option vs. the way options like `-G' are supposed to work according to the standards. >I think "ps xX" should be an error, and maybe "ps xx" too. Nah. -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu