Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Jun 2002 20:24:33 -0700
From:      Juli Mallett <jmallett@FreeBSD.org>
To:        Cyrille Lefevre <cyrille.lefevre@laposte.net>
Cc:        standards@FreeBSD.org
Subject:   Re: cvs commit: www/en/projects/c99 index.sgml
Message-ID:  <20020610202431.A30207@FreeBSD.ORG>
In-Reply-To: <20020611030857.GB14401@gits.dyndns.org>; from cyrille.lefevre@laposte.net on Tue, Jun 11, 2002 at 05:08:57AM %2B0200
References:  <200206070217.g572HH584853@freefall.freebsd.org> <20020606194448.A23497@FreeBSD.ORG> <20020611030857.GB14401@gits.dyndns.org>

next in thread | previous in thread | raw e-mail | index | archive | help
* Cyrille Lefevre <cyrille.lefevre@laposte.net> escriurères
> On Thu, Jun 06, 2002 at 07:44:49PM -0700, J. Mallett wrote:
> > * From Mike Barcroft <mike@FreeBSD.org>
> > > mike        2002/06/06 19:17:17 PDT
> > > 
> > >   Modified files:
> > >     en/projects/c99      index.sgml 
> > >   Log:
> > >   J. Mallett will be coordinating changes to ps(1).
> > 
> > Which essentially means:  If you have patches for ps(1) wrt SUSv3 conformance,
> > or want to discuss which options of ours should go in favor of SUSv3 ones that
> > conflict, which should be optional, etc., speak up.
> 
> well, I'm a lot disapointed about your nomination while I ask for it last
> week.  I suppose you get the maintainership of ps(1) because you are
> a commiter ? whatever, here is, in attachment, the current version of

On the contrary.  I am coordinating the changes, because I am a committer, but
I did not (I explicitly told mike@ that I did not) want to be in charge of this
task.  There's a lot of different approaches that could be taken with dealing
with ps(1), as it's one of those unpleasent situations where compromises, etc.,
may be made, and it's important those things aren't in the hands of one single
person, and I'm an agreeable person, and as such happy to coordinate to come
up with the best conformant ps(1) we can have! :)

> ps(1) I'm working on.

Thanks.

> PS : I've tryed to subscribe to this list twince w/o success, any ideas ?

majordomo can be difficult, a message to majordomo@FreeBSD.org with contents
of "subscribe freebsd-standaards" or "subscribe standards" should work.

> ps compatible pre-BSD44, BSD44 and SUSV2
> 
> first of all, this code has been made last year and is based on
> -stable version of ps(1). since then, I never posted it before
> because it's conformance to SUSV2 (now SUSV3) needs to be checked.
> this need always to be done and I will do it w/in the next days
> (weeks?). in the meantime, I'll write a more detailled note about
> differences between BSD and SUSV3 ps(1). also, the manual would
> have to be updated to reflect the reallity (any volunteer ? :).

The manual page may prove to be one of the least pleasent tasks, as while
SUS/POSIX has taken from BSD manpages before, we are not allowed to use
their text.

> old compilation flags :
> 
> BACKWARD_COMPATIBILITY
> 	convert pre BSD44 options (w/o dash) to BSD44 ones.
> 
> LAZY_PS
> 	enable option -f to show command line and environment
> 	information about swapped out processes else, the -f
> 	option is implied.
> 
> new compilation flags :
> 
> COMPAT_BSD44
> 	be strictly compatible w/ BSD44 ps, else :
> 	* -p, -t and -U respectively accept a list of pids, ttys
> 	  or users instead of a single one.
> 	* -t accept ttyXX in addition to /dev/ttyXX and XX.
> 	* -U also accept uids in addition of user names.
> 	* output is formated more intelligently when combining
> 	  options such as -j, -l, -u and -v.  format strings are
> 	  combined instead of being concatenated.
> 	* -o keyword=header now works for aliased keywords, also,
> 	  -o keyword= don't print an empty line anymore, if any.
> 
> COMPAT_SUSV2
> 	be compatible w/ SUSV2 ps if the SUSV2 environment variable
> 	has a non-zero value or if called as ps5. this may be
> 	overriden using the new -B (BSD) or -V (SUSV2) options.
> 	SUSV2 is automagically disabled when using pre BSD44 options.
> 	SUSV2 options are, in fact, almost the SYSV ones.
> 
> 	here is the usage string :
> 
> usage: ps [-AaBdefjl] [-C cmdlist] [-g pgrplist] [-G grouplist] [-o fmt]
>           [-p pidlist] [-t ttylist] [-u userlist] [-U userlist]
> 	  [-m core] [-n system] [-w swap]
> 
> 	here are the new -o keywords w/ their BSD44 counterpart,
> 	if any, in parentheses :
> 
> 		addr (paddr), args (command), c, comm (command),
> 		etime, group, l (state), rgroup and stime.
> 	and the ones which are affected when SUSV2 is enable :
> 
> 		pri and time.

Why can't these be there by default?

> NO_SWAP
> 	disable -W option since kvm(3) doesn't read swap for almost
> 	10 years.
> 
> also, single-linked tail queues have been converted to queue(3).

This is a mixed thing.  Some people will rightly say that conversion of a
simplistic paradigm of code to the queue(3) constructs can be obfuscatory,
and certainly macros which evolved after 4.3BSD sometimes differ in their
meaning.  TAILQ_FOREACH{,_REVERSE} on OSX bit me particularly hard.

> Index: Makefile
> ===================================================================
> RCS file: /home/ncvs/src/bin/ps/Makefile,v
> retrieving revision 1.13
> diff -u -r1.13 Makefile
> --- Makefile	17 Nov 1999 13:37:30 -0000	1.13
> +++ Makefile	11 Jun 2002 03:02:38 -0000
> @@ -9,7 +9,12 @@
>  # keep ps from being an unnecessary load
>  # on large systems.
>  #
> -CFLAGS+=-I${.CURDIR}/../../sys -DLAZY_PS
> +CFLAGS= -g
> +CFLAGS+= -I${.CURDIR}/../../sys
> +CFLAGS+= -DBACKWARD_COMPATIBILITY
> +CFLAGS+= -DLAZY_PS
> +# CFLAGS+= -DCOMPAT_BSD44
> +CFLAGS+= -DCOMPAT_SUSV2
>  DPADD=	${LIBM} ${LIBKVM}
>  LDADD=	-lm -lkvm
>  #BINGRP=	kmem

There should be a make(1) tunable to handle the SUS compatability so that
a system being tested for standards conformance could have a flag such
as:
	POSIX_CONFORM= NOBSD

To disable BSD things that conflict with POSIX and use POSIX instead, or:
	POSIX_CONFORM= NOCONFLICT

To use POSIX things where there's no conflict with BSD, but which are not
meaningful in BSD (things related to sysv runtimes come to mind). 

The rest of it looks straightforward in places, but some of the changes look
a bit big and I'd like to see what later comes up wrt susv3 and patches to the
current version of ps(1).

Thanks!
-- 
Juli Mallett <jmallett@FreeBSD.org>                  FreeBSD: The Power To Serve
Perception is prejudice / Don't classify me / Accept me as me / Not what you see

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-standards" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020610202431.A30207>