Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Jan 2009 17:04:29 -0500
From:      Garance A Drosehn <gad@FreeBSD.org>
To:        Mike Meyer <mwm@mired.org>, "Sheldon Givens" <sheldon@sigsegv.ca>
Cc:        freebsd-hackers@FreeBSD.org
Subject:   Re: Small change to 'ps'
Message-ID:  <p06240804c5901983a02f@[128.113.24.47]>
In-Reply-To: <20090109015106.3614a378@mbook.local>
References:  <f4ecc0930901061152q2ad01c4fj42dec8ad9fb201fa@mail.gmail.com> <20090107125759.GA1462@roadrunner.spoerlein.net> <alpine.BSF.2.00.0901070851560.43659@thor.farley.org> <20090107154854.GC1462@roadrunner.spoerlein.net> <f4ecc0930901070927m2eec8770r9df984b21a97f5f7@mail.gmail.com> <20090109015106.3614a378@mbook.local>

next in thread | previous in thread | raw e-mail | index | archive | help
At 1:51 AM -0500 1/9/09, Mike Meyer wrote:
>On Wed, 7 Jan 2009 "Sheldon Givens" <sheldon@sigsegv.ca> 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



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