From owner-freebsd-current@FreeBSD.ORG Mon Mar 8 18:40:23 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 201A516A4CF for ; Mon, 8 Mar 2004 18:40:23 -0800 (PST) Received: from smtp2.server.rpi.edu (smtp2.server.rpi.edu [128.113.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id BF1B843D2F for ; Mon, 8 Mar 2004 18:40:22 -0800 (PST) (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 i292eMla008289 for ; Mon, 8 Mar 2004 21:40:22 -0500 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: Date: Mon, 8 Mar 2004 21:40:21 -0500 To: current@FreeBSD.org From: Garance A Drosihn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: CanIt (www . canit . ca) Subject: Question on 'ps -p ' in current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Mar 2004 02:40:23 -0000 This topic may have come up before, a long time ago, and I just missed it. If so, apologies for the repeat. On stable, if you say 'ps -p ', and there is no process '', then you get the header-line from 'ps' and nothing else. The command-status is set to indicate failure. On -current, the same command gives you the error message: ps: kvm_getprocs: No such process and you get no header line. Other OS's also give you the header line and no special error message. I think this behavior in current is an unplanned side-effect of the change in revision 1.46 of http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libkvm/kvm_proc.c where that was fixing a side-effect of a fix in revision 1.60 of malloc.c. In some other OS's, 'ps' behaves the way it does for us in -stable. Looking at SUSv3, it's not clear to me if either behavior is preferred. Should 'ps' in this situation behave like it does in -stable? Or is this a change that we deliberately wanted to make in -current? I would be willing to change 'ps' if people prefer the earlier behavior, but I'll leave it alone if this was an intentional change. -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu