PATCH for a more-POSIX `ps', and related adventures

Garance A Drosihn drosih at rpi.edu
Mon Mar 22 10:18:33 PST 2004


At 4:59 PM +0100 3/22/04, Jilles Tjoelker wrote:
>On Sat, Mar 20, 2004, Garance A Drosihn wrote:
>  > [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.

Well, my follow-up message explained my reasoning for this in more
detail, but your logic seems pretty reasonable too.  If I do this,
I'll add a -X option which would "turn off -x", so to speak.  There
are times where I don't want to see the extra processes.  A `-X'
option does not seem to conflict with solaris, aix, or irix.  Linux
does have a -X, but it's for "old Linux i386 register format", and I
think we can safely assume we would never implement that, and that
it is also not likely to become a "standard" option...

I think I'll do it that way.

-- 
Garance Alistair Drosehn            =   gad at gilead.netel.rpi.edu
Senior Systems Programmer           or  gad at freebsd.org
Rensselaer Polytechnic Institute    or  drosih at rpi.edu


More information about the freebsd-standards mailing list