From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 11 23:10:52 2009 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B82D1065670 for ; Sun, 11 Jan 2009 23:10:52 +0000 (UTC) (envelope-from gad@FreeBSD.org) Received: from smtp7.server.rpi.edu (smtp7.server.rpi.edu [128.113.2.227]) by mx1.freebsd.org (Postfix) with ESMTP id BFEB08FC1A for ; Sun, 11 Jan 2009 23:10:51 +0000 (UTC) (envelope-from gad@FreeBSD.org) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp7.server.rpi.edu (8.13.1/8.13.1) with ESMTP id n0BM4UEF003380; Sun, 11 Jan 2009 17:04:30 -0500 Mime-Version: 1.0 Message-Id: In-Reply-To: <20090109015106.3614a378@mbook.local> References: <20090107125759.GA1462@roadrunner.spoerlein.net> <20090107154854.GC1462@roadrunner.spoerlein.net> <20090109015106.3614a378@mbook.local> Date: Sun, 11 Jan 2009 17:04:29 -0500 To: Mike Meyer , "Sheldon Givens" From: Garance A Drosehn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Bayes-Prob: 0.0001 (Score 0) X-RPI-SA-Score: 0.10 () [Hold at 20.00] COMBINED_FROM X-CanItPRO-Stream: outgoing X-Canit-Stats-ID: Bayes signature not available X-Scanned-By: CanIt (www . roaringpenguin . com) on 128.113.2.227 Cc: freebsd-hackers@FreeBSD.org Subject: Re: Small change to 'ps' X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2009 23:10:52 -0000 At 1:51 AM -0500 1/9/09, Mike Meyer wrote: >On Wed, 7 Jan 2009 "Sheldon Givens" wrote: > > And I guess I just feel like running a second command to do what should be >> possible to do with the first command (and is, on many platforms. ps >> --no-headers on linux for example) is a problem and presents opportunity for >> continued refinement of the utility. > >I agree. However, [...] > >So `--no-headers' is ok. However, `-n' has lots of different meanings >in different commands. How about borrowing from existing commands that >already implement this functionality (zfs and zpool) and using `-H', >which is relatively rarely used elsewhere? I recommend against adding any single-letter option to the `ps' command. This command is already an absolute minefield of headaches when it comes to portability across operating systems (and POSIX). Trying to sneak in some single-letter option is bound to give us headaches in the long run. Adding something like '--no-headers' is pretty safe, although that opens up a different set of arguments (heh) when it comes to `ps' on freebsd. Namely, we don't have any long-options in our `ps'. Yet another tactic might be to add another accepted keyword to '-o', since it already uses words as its acceptable values. We'd be bending the definition of `-o' a bit to do that, but we could at least do that in a way which would be very unlikely to conflict with an option in any other version of `ps'. -- Garance Alistair Drosehn = drosehn@rpi.edu Senior Systems Programmer or gad@FreeBSD.org Rensselaer Polytechnic Institute; Troy, NY; USA