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

Cyrille Lefevre cyrille.lefevre at laposte.net
Sat Mar 27 02:41:12 PST 2004


"Garance A Drosihn" <drosih at rpi.edu> wrote:
> 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.

not every version, but at least, the one w/ interesting options.
my patch will follow w/o the enhanced personality part.
could you take an eye on it before to commit your changes ?
as I read your proposed changes, we could merge them w/o
any problem. well, in fact, I already merge some of them
(the or part instead of and).

original ps : 26668 (no posix compliant)
yours : 31072 (partly posix compliant)
mine : 35684 (fully posix compliant)

> 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

at the beginning, it was not, but ...

> 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.

that's what other system does to avoid conflicts and for clarity.

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

not necesseraly, take a look on the tru64 manual pages.

[snip]
> 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.

see you

Cyrille Lefevre.
-- 
home: mailto:cyrille.lefevre at laposte.net


More information about the freebsd-arch mailing list