posix ps (was Re: Adding `pgrep' and `pkill' to /usr/bin)

Garance A Drosihn drosih at rpi.edu
Fri Mar 26 16:13:50 PST 2004


At 6:40 PM +0100 3/26/04, Cyrille Lefevre wrote:
>
>two years ago, I've added posix syntax and so to my locally
>ps(1).  For instance, I'm currently adding the notion of
>dynamic personalities (the term comes from linux) instead
>of static #define such as... say :
>
>$ ps -X help
>   any bsd bsd43reno bsd44 default extended freebsd hpux
>   irix netbsd none openbsd pedantic posix relaxed solaris
>   sunos susv3 tru64
         ...etc...

>When finished, I'll probably submit these changes as a port,
>... since I suppose -arch will reject these important changes
>to a native command.

I (personally) think that is overkill for a base-system command.
I do think that it is important for us to improve on what we
have for `ps, but that does not mean we immediately have to
rush out and re-implement every version of `ps' on the planet.

You are suggesting that we go from being the least feature-full
and most-oddball `ps', to trying to match every `ps' along with
every subtle formatting-nuance of every system.  With the changes
that I just did, I went through a fair amount of trouble to make
sure that I was not increasing the size of `ps'.  There are some
FreeBSD users who need to squeeze the OS onto very small file
systems, and I think that is a reasonable thing for our users
to want.  I (personally) think that the size and complexity of
some all-encompassing `ps' is not worth the effort, and not worth
the PR's we will get over every feature does not *EXACTLY* match
how it behaves on the "original OS".

I can see your `ps' being a very good option to have as a port,
and I might even install it in some situations, but I do not
think we want something that elaborate for a base-system command.

>here are some sample outputs :
>
>$ PERSONALITY=freebsd ps -?

Secondly, I personally am not fond of commands which COMPLETELY
change their behavior based on environment variables.  Different
options, different formats, different rules.

If nothing else, writing the man page for that would be a real
nightmare, and I am no good at writing man pages...  :-)

  - - - - - - - - - - - - - - - - - - - - - - - - -
HOWEVER,
Note that in a different message, written
           on March 25/2004, Jacques A. Vidrine wrote:
>On Mon, Mar 22, 2004, Garance A Drosihn wrote:
>  > Great.  So what should I do here?
>
>I dunno.  Add a completely POSIX compliant ps command into
>/usr/posix ?  Or replace /usr/bin/ps with a completely POSIX
>compliant ps and move our traditional one to /usr/ucb? :-)
>
>Seriously, we should give some hard thought into how to
>provide/migrate to a POSIX compatible utilities environment.
>It's been discussed on the lists before, but I still believe
>providing POSIX compatible versions of utilities on a separate
>path is the only clean way to make this happen.

I do have some ideas of what I want to do to provide FreeBSD
users with at least an option for posix behavior out of `ps'.

I was going to write those up in reply to this message, but I
have a steady-stream of "emergency interruptions" (here at work)
today, and I'm supposed to be somewhere else right now, so I
guess my thoughts will wait until a later date.

The one thing I would say is that I expect to do a few gradual
updates which will get us "somewhat better".  I do not expect
to write one cure-all update that attempts to solve everything
at once.  That is just not the way I like to work.

-- 
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-arch mailing list