From owner-freebsd-arch@FreeBSD.ORG Sat Jun 12 15:28:47 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 90C0616A4CE for ; Sat, 12 Jun 2004 15:28:47 +0000 (GMT) Received: from smtp2.server.rpi.edu (smtp2.server.rpi.edu [128.113.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2F96843D1D for ; Sat, 12 Jun 2004 15:28:47 +0000 (GMT) (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 i5CFRxVu024551; Sat, 12 Jun 2004 11:28:00 -0400 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <038901c45085$a08bde90$7890a8c0@dyndns.org> References: <200406041933.i54JX9kj040764@mail.gits.dyndns.org> <038901c45085$a08bde90$7890a8c0@dyndns.org> Date: Sat, 12 Jun 2004 11:27:58 -0400 To: "Cyrille Lefevre" , From: Garance A Drosihn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: CanIt (www . canit . ca) Subject: Re: Change to "kludge option processing" in /bin/ps 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, 12 Jun 2004 15:28:47 -0000 At 4:00 PM +0200 6/12/04, Cyrille Lefevre wrote: > > So, `ps -G ,nobody,' is a list with three elements, two of which >> are null. Null elements are an error. So, you get two error >> messages. As I sit here right now, I still think that is the >> correct and reasonable behavior, so I have no plans to change it. > >think about not well formed shell script. it isn't necessary to >display an error message like this, more important, ps should not >stop on such error, al least, it should display process info for >non- empty elements. however, it's far better than to believe ,, >means 0 :) imagine something like : ps -o pid= ,, | xargs kill If `ps -p ,' is an error instead of process zero (which is a change that I just made after you pointed it out to me), then `ps -p 1,' is also an error. I *am* thinking about shell-scripts which are not well-formed. My thought is that I should not be second-guessing what the script-writer "probably meant". If they can't get the right parameters to `ps', then `ps' should treat that as an error. So, I still have no plans to change this behavior. The behavior that is there is, I believe, both correct and reasonable -- even if other OS's do it some other way. -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu