From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 25 15:03:32 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 B3BE71065693; Tue, 25 Aug 2009 15:03:32 +0000 (UTC) (envelope-from ady@ady.ro) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.27]) by mx1.freebsd.org (Postfix) with ESMTP id 13BE58FC29; Tue, 25 Aug 2009 15:03:31 +0000 (UTC) Received: by ey-out-2122.google.com with SMTP id 4so699380eyf.9 for ; Tue, 25 Aug 2009 08:03:31 -0700 (PDT) MIME-Version: 1.0 Sender: ady@ady.ro Received: by 10.210.27.20 with SMTP id a20mr2455073eba.28.1251211014149; Tue, 25 Aug 2009 07:36:54 -0700 (PDT) In-Reply-To: <4A93EE5B.8000300@gmail.com> References: <20090825034054.2d57e733@dev.lan.Awfulhak.org> <20090825134447.GM2829@hoeg.nl> <4A93EE5B.8000300@gmail.com> Date: Tue, 25 Aug 2009 16:36:54 +0200 X-Google-Sender-Auth: daa6e7c2e131e48a Message-ID: <78cb3d3f0908250736g2ef52068pb84896eac5a2c45d@mail.gmail.com> From: Adrian Penisoara To: Ivan Radovanovic Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Ed Schouten , Brian Somers , freebsd-hackers@freebsd.org Subject: Re: Deprecating ps(1)s -w switch 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: Tue, 25 Aug 2009 15:03:32 -0000 Hi, On Tue, Aug 25, 2009 at 3:59 PM, Ivan Radovanovic wrote: > Ed Schouten napisa: > > * Brian Somers 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