Deprecating ps(1)s -w switch

Adrian Penisoara ady at freebsd.ady.ro
Tue Aug 25 15:03:32 UTC 2009


Hi,

On Tue, Aug 25, 2009 at 3:59 PM, Ivan Radovanovic <rivanr at gmail.com> wrote:

> Ed Schouten napisa:
>
>  * Brian Somers <brian at FreeBSD.org> wrote:
>>
>>
>>> I recently closed bin/137647 and had second thoughts after Ivan (the
>>> originator) challenged my reason for closing it.
>>>
>>> The suggestion is that ps's -w switch is a strange artifact that can
>>> be safely deprecated.  ps goes to great lengths to implement width
>>> limitations, and any time I've seen people not using -ww has either
>>> been a mistake or doesn't matter.  Using 'cut -c1-N' is also a great
>>> way of limiting widths if people really want that...
>>>
>>> I'd like to propose changing ps so that width limits are removed and
>>> '-w' is deprecated - ignored for now with a note in the man page
>>> saying that it will be removed in a future release.
>>>
>>> Does anyone have any objections to doing this?  I don't propose
>>> merging this back into stable/8.
>>>
>>>
>>
>> So ps(1) output can never be limited to the screen width?
>>
>>
> I think it would be smart not to limit width by default (ie default
> behavior to be like with -ww), but to have some switch (like -w) to limit
> width if someone really needs to do that, although with "cut -c 1-80" could
> be achieved limiting...


 Let's not reverse the meaning of switches, for the sake of compatibility
with (older) existent scripts...

 Maybe we should also think about compatibility with System V Unix / Linux
-- I have encountered quite a lot of scripts expecting "ps -ef" to give an
"all processes" output. It would not hurt to review what the Linux folks did
with their ps(1) -- it supports 3 kinds of options for UNIX/BSD/GNU flavors.

Regards,
Adrian Penisoara
EnterpriseBSD


More information about the freebsd-hackers mailing list