From owner-freebsd-arch@FreeBSD.ORG Sat Jun 12 20:08:11 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 8702A16A4CE for ; Sat, 12 Jun 2004 20:08:11 +0000 (GMT) Received: from ioskeha.hittite.isp.9tel.net (ioskeha.hittite.isp.9tel.net [62.62.156.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0915E43D39 for ; Sat, 12 Jun 2004 20:08:11 +0000 (GMT) (envelope-from clefevre-lists@9online.fr) Received: from pc2k (67-61-118-80.kaptech.net [80.118.61.67]) by ioskeha.hittite.isp.9tel.net (Postfix) with SMTP id 1811118060A; Sat, 12 Jun 2004 18:04:50 +0200 (CEST) Message-ID: <042401c45096$d68f2b80$7890a8c0@dyndns.org> From: "Cyrille Lefevre" To: , "Garance A Drosihn" References: <200406041933.i54JX9kj040764@mail.gits.dyndns.org> <038901c45085$a08bde90$7890a8c0@dyndns.org> Date: Sat, 12 Jun 2004 18:03:43 +0200 Organization: ACME MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 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 20:08:11 -0000 "Garance A Drosihn" wrote: > 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,' no, the cases are differents, in the first case, you have no process id at all, in the second case, you have one process id. and it seems normal to bail out if you have no process id to list and not normal if there is at least one process id to list. > 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. Cyrille Lefevre. -- mailto:clefevre-lists@9online.fr