Subject: Re: ps(1) sysv silliness
To: None <tech-userlevel@netbsd.org>
From: Simon Burge <simonb@netbsd.org>
List: tech-userlevel
Date: 06/08/2000 11:16:03
ITOH Yasufumi wrote:
> simonb@netbsd.org writes:
>
> > I've got some relatively simple mods to ps(1) so that it uses SysV-type
> > command-line argument parsing instead of the traditional BSD-style
> > parsing if a certain environment variable is set (I chose PS_SYSV but
> > Luke suggested that there might be a `global' "use-sysv-arguments"
> > variable that other programs could recognise as well).
>
> Using environment variable may cause problems.
> It forces users using ps(1) in shell scripts to be aware of the variable,
> and every existent script needs being rewritten so as not to be affected
> by user settings.
Yes, I'm starting to think that the environment variable idea isn't the
best. The work so far is pretty much proof-of-concept and is very much
open to change.
> I suggest either
>
> 1. make it a separate program, such as
> /usr/bin/ps-sysv, /usr/5bin/ps, etc., or
> 2. implement it using command-line option
> ex. "ps -A" for AT&T / "ps -B" for Berkeley.
I think 1 is better - the idea of using a command line switch to choose
which command line switches you want to use seems a little ... silly.
Given that the people who use it would probably "alias ps ps-sysv", I
guess it'd need to be a separate program...
Simon.