[VODZ] ps w

Bernhard Fischer rep.nop at aon.at
Wed Oct 5 10:32:06 UTC 2005


On Wed, Oct 05, 2005 at 01:15:06PM +0400, Vladimir N. Oleynik wrote:
>Bernhard,
>
>>The "problem" with ps.c was *not* the multiple "-w" but the dash ('-')
>>bb_getopt_ulflags enforces.
>>
>>With your two patches, this one doesn't work anymore:
>>./busybox ps www
>>
>>Will you extend bb_getopt_ulflags to make the leading dash for short
>>options optional? 
>
>How?

It would be too involving (and bloated!) to do that, imo.

You'd have to copy the args in bb_getopt_ulflags, filter them and feed
the rest to getopt. Or we could allow for bb_opt_complement="w." i.e.
introduce some means to make the leading dash optional, perhaps. Just an
idea, though.
>
>>If not then please fix ps to accept it's options
>>without the '-' (i.e. revert your two patches).
>
>Unix "ps" utilite have old-compatibile problem. Usage
>
>$ ps -x w; ps w -x
>
>have producing error, but do not produce error if
>
>$ ps x; ps -x; ps -e w; ps w -e

Yes, i know.
>
>Its strange for me. The phrase:
>"Set the I_WANT_A_BROKEN_PS environment variable to force BSD
>syntax  even when options are preceeded by a dash."
>from manual confused me too. Its partially default?

ps -w ; ps w do work here, producing the expected output. AFAICS i do
not have I_WANT_A_BROKEN_PS set.
>
>Do revert patch? May be.
>But I think, make mainstream
>compatibility the algorithm of parse opts better.
>I examine procps-3.0 source. This have
>1) the analizator -opts as SysV
>2) the analizator opts as BSD
>I "realize" first point. ;-)

.. and broke the second, which worked before just as the first one did
work before. That's a regression ;)

>If drop getopt(), then support --long_option may be
>have hard a problem for writing the algorithm decoder.

Personally, i don't have any plans to add any long options. If somebody
in the future desires to do so, then she is free to switch over to
getopt, i'd say. OTOH, whoever needs the long option will most likely
use the big, bloated^Wfeature-complete version, i guess.

I want busybox' ps to go into wide output-mode for both "-w" *and* "w".

>The mainstream decoder is BLOAT!



More information about the busybox mailing list