>On Fri, Feb 15, 2008 at 1:55 PM,  <[EMAIL PROTECTED]> wrote:
>>
>>
>>  Currently Solaris has two distinct versions of ps; to use one or the other
>>  you need to either give the full path or change $PATH.
>>
>>  And that while a little bit of code could tell most invocations apart.
>>
>>  Because it has been bothering me I'd like to fix this and so I'd like to
>>  ask some advice.
>>
>>  Merging the code in a simple fashion (renaming main ucbmain/stdmain and
>>  calling one other the other) is straight forward enough but I'm not sure
>>  how useful it is.
>>
>>  The simple plan is this:
>>
>>         - if called with an argument which does not start with "-",
>>           be /usr/ucb/ps
>>         - if called with an argument starting with "-" behave like ucb ps
>>           or bin/ps depending on how the program was invoked
>
>The first is right; the second I'm not so sure. How I've had this for the
>last decade (and is similar to the way that some other ps implementations
>seemed to behave) is that if there's an argument starting with "-", be
>/usr/bin/ps.
>
>This is more deterministic - it doesn't lead to unexpected behaviour in
>the event of user typos or changes to the valid flags.
>
>The other question would be - which output do you get with no
>arguments at all?

The same as currently, depending on $PATH.  I'm not sure what other 
compatible options there are.

Caspers

_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to