Change to "kludge option processing" in /bin/ps
Garance A Drosihn
drosih at rpi.edu
Sat Jun 12 15:28:47 GMT 2004
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 at gilead.netel.rpi.edu
Senior Systems Programmer or gad at freebsd.org
Rensselaer Polytechnic Institute or drosih at rpi.edu
More information about the freebsd-arch
mailing list