PATCH for a more-POSIX `ps', and related adventures
Garance A Drosihn
drosih at rpi.edu
Wed Mar 24 17:20:12 PST 2004
At 7:43 PM -0500 3/24/04, Garance A Drosihn wrote:
>At 4:52 PM -0500 3/24/04, Albert Cahalan wrote:
>
>> > I am not thrilled with that idea, but at the moment I can't
>> > think of a better one. I *would* like to support matches of
>> > both real and effective users. I guess we could add some
>> > other option which would say "use the POSIX definitions of
>> > -u and -U", but that doesn't exactly thrill me either.
>>
>>Why not? Tru64 uses the CMD_ENV environment variable to
>>handle this. Linux does too, with PS_PERSONALITY taking
>>priority. So, on either OS, you can do:
>
>I don't like keying a command's option-parsing behavior off of
>environment variables. I can be talked into it if it would be
>following some precedent in other OS's, but my initial-reaction
>to this tactic (for any command) is to avoid it. Please note that
>this isn't some multi-month project that I've been working on, I
>have been looking at this for less than a week, and very little
>of that week. I just thought I'd do some of the "easy stuff"
>that would get our `ps' a little closer to SUSv3.
>
>So, given a little time you might be able talk me into using
>environment vars to clean this up, but at the moment: ENOTIME...
I should mention that I have been thinking of MAYBE creating some
new command, say `psx', which would be much more SUSv3 compatible.
It would be the same source code as `ps', and the behavior would
key off of the name of the executable. Actually, maybe two new
commands, `psbsd' and `psx'. In 5.x-stable we would have `ps'
be exactly the same as `psbsd', and in 6.x-current we could have
`ps' be exactly the same as `psx'. That way, scripts which HAD to
work on both systems could pick the executable that they wanted.
I haven't discussed that with anyone else yet, though. It's just
something that came to mind when I was thinking about all these
conflicting-options over the weekend. For all I know, everyone
here would hate the idea... Give me another week to think about
it, and I might even hate the idea!
--
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