From owner-freebsd-arch@FreeBSD.ORG Fri Mar 26 16:13:50 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0DB5516A4CE; Fri, 26 Mar 2004 16:13:50 -0800 (PST) Received: from smtp2.server.rpi.edu (smtp2.server.rpi.edu [128.113.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id B8F7043D41; Fri, 26 Mar 2004 16:13:49 -0800 (PST) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp2.server.rpi.edu (8.12.8/8.12.8) with ESMTP id i2R0DkLI006688; Fri, 26 Mar 2004 19:13:49 -0500 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <1a9c01c41359$b3da45e0$7890a8c0@dyndns.org> References: <20040325070120.GA67497@VARK.homeunix.com> <1a9c01c41359$b3da45e0$7890a8c0@dyndns.org> Date: Fri, 26 Mar 2004 19:13:45 -0500 To: "Cyrille Lefevre" , "David Schultz" From: Garance A Drosihn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: CanIt (www . canit . ca) cc: "Jacques A. Vidrine" cc: arch@freebsd.org cc: Albert Cahalan Subject: Re: posix ps (was Re: Adding `pgrep' and `pkill' to /usr/bin) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Mar 2004 00:13:50 -0000 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@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu