Date: Wed, 9 Jun 2004 18:26:43 -0400 From: Garance A Drosihn <drosih@rpi.edu> To: "Cyrille Lefevre" <clefevre-lists@9online.fr>, <arch@freebsd.org> Subject: Re: Change to "kludge option processing" in /bin/ps Message-ID: <p0602044ebced3d3afbd0@[128.113.24.47]> In-Reply-To: <p0602042fbce693792f92@[128.113.24.47]> References: <200406041933.i54JX9kj040764@mail.gits.dyndns.org> <p0602042fbce693792f92@[128.113.24.47]>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <blank> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p0602044ebced3d3afbd0>