Casper.Dik at Sun.COM wrote:
>> First off, I really like what this case is trying to do.  But I do have 
>> a possible concern:  /usr/ucb/ps could have been used with  a leading 
>> "-".  E.g. /usr/ucb/ps -aux and /usr/ucb/ps aux both return the same thing.
>>
>> I'd humbly suggest that if getexecname returns /usr/ucb/ps then the 
>> legacy UCB behavior should be used unconditionally.
>>     
>
> What I propose isn't all that different.  /usr/ucb/ps will ONLY behave
> like /usr/bin/ps IF AND ONLY IF one of the arguments is NOT recognized by
> /usr/ucb/ps.  Rather than printing an error message, it tries to do
> something plausible.
>
> I thought the examples clarified that.
>   

Hmm... maybe I didn't understand.   As long as /usr/ucb/ps behaves as 
/usr/ucb/ps whenever any valid syntax that was accepted by it today is 
given, then I'm ok with it.  (And understanding that "-" is a valid part 
of the syntax. :-)

That said, I do sort of think that the rule you have, while workable, is 
more confusing and violates the principle of least surprise.    (I.e. 
you added a switch by accident which suddenly changed the meaning of 
other options in a totally unexpected fashion.)

But given as we're talking about a case that would otherwise be an 
error, I'm not sure there is architecturally relevant cause to debate it 
further.

    -- Garrett


Reply via email to