From owner-freebsd-arch@FreeBSD.ORG Wed Jun 9 22:26:49 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 9905716A4CE for ; Wed, 9 Jun 2004 22:26:49 +0000 (GMT) Received: from smtp2.server.rpi.edu (smtp2.server.rpi.edu [128.113.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3D14D43D45 for ; Wed, 9 Jun 2004 22:26:49 +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 i59MQjVu027140; Wed, 9 Jun 2004 18:26:45 -0400 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: References: <200406041933.i54JX9kj040764@mail.gits.dyndns.org> Date: Wed, 9 Jun 2004 18:26:43 -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: Wed, 09 Jun 2004 22:26:49 -0000 At 5:34 PM -0400 6/4/04, Garance A Drosihn wrote: >At 10:13 PM +0200 6/3/04, Cyrille Lefevre wrote: >> >>ok, let's try another issue : >> >># ps -G " nobody " >> PID TT STAT TIME COMMAND >>75483 con- S 0:10.97 /usr/local/sbin/junkbuster configfile >># ps -G ,nobody, >>ps: Invalid (zero-length) group name >>ps: Invalid (zero-length) group name >># ps -G , >>ps: Invalid (zero-length) group name >>ps: Invalid (zero-length) group name > > >>why do you make a difference while parsing commas and spaces ? When I first read this, I thought you meant that my latest `ps' was not accepting blanks somewhere that it should have. Now that I read it closer, it seems that you want me to treat a comma the same as a blank. The spec that I am reading from talks about "in the form of a or comma-separated list". To me, that means "a list which is separated by one or more spaces or tabs, or by a comma". Thus, one comma must be a separator between two elements in a list. 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. I can see that it could be argued that leading or trailing blanks should also be considered a separator, and should also cause an error. I prefer the present behavior, but I will change that to generate an error if people really think it should be. -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu