Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Jun 2004 11:27:58 -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:  <p0602045ebcf0d0336fe7@[128.113.24.47]>
In-Reply-To: <038901c45085$a08bde90$7890a8c0@dyndns.org>
References:  <200406041933.i54JX9kj040764@mail.gits.dyndns.org> <p0602042fbce693792f92@[128.113.24.47]> <p0602044ebced3d3afbd0@[128.113.24.47]> <038901c45085$a08bde90$7890a8c0@dyndns.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p0602045ebcf0d0336fe7>