Date: Thu, 25 Mar 2004 18:10:25 -0500 From: Garance A Drosihn <drosih@rpi.edu> To: Albert Cahalan <albert@users.sourceforge.net> Cc: freebsd-standards@freebsd.org Subject: Re: PATCH for a more-POSIX `ps', and related adventures Message-ID: <p0602047fbc890e9eaa84@[128.113.24.47]> In-Reply-To: <1080252862.2255.1141.camel@cube> References: <1080165171.2232.910.camel@cube> <20040325191745.GB71731@stack.nl> <1080247208.2232.1095.camel@cube> <p0602047dbc88f7743c8e@[128.113.24.47]> <1080252862.2255.1141.camel@cube>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p0602047fbc890e9eaa84>