From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 27 07:09:15 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 3C2B8106568B; Thu, 27 Aug 2009 07:09:15 +0000 (UTC) (envelope-from prvs=14836b82ff=brian@FreeBSD.org) Received: from idcmail-mo1so.shaw.ca (idcmail-mo1so.shaw.ca [24.71.223.10]) by mx1.freebsd.org (Postfix) with ESMTP id E81B68FC1C; Thu, 27 Aug 2009 07:09:14 +0000 (UTC) Received: from pd3ml1so-ssvc.prod.shaw.ca ([10.0.141.140]) by pd2mo1so-svcs.prod.shaw.ca with ESMTP; 27 Aug 2009 00:40:21 -0600 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.0 c=1 a=MJPcHhXccCG8eBs0us8XwA==:17 a=6I5d2MoRAAAA:8 a=MMwg4So0AAAA:8 a=rrxcYoe_TmSxUakYs3IA:9 a=W2Vh8_yiTJ6VnWxprLUA:7 a=rVTwtgZgkWwnu82VMncLQtreuDgA:4 a=SV7veod9ZcQA:10 a=WJ3hkfHDukgA:10 a=Q8kfNSWlL1dofc25vHwA:9 a=IMQyv7S60G0m8Sjpa4D7xI35sB8A:4 Received: from unknown (HELO store.lan.Awfulhak.org) ([70.79.162.198]) by pd3ml1so-dmz.prod.shaw.ca with ESMTP; 27 Aug 2009 00:40:20 -0600 Received: from store.lan.Awfulhak.org (localhost.localdomain [127.0.0.1]) by localhost (Email Security Appliance) with SMTP id 2955CC440AB_A962A56B; Thu, 27 Aug 2009 06:40:22 +0000 (GMT) Received: from gw.Awfulhak.org (gw.lan.Awfulhak.org [172.16.0.1]) by store.lan.Awfulhak.org (Sophos Email Appliance) with ESMTP id B06CBC460F4_A962A51F; Thu, 27 Aug 2009 06:40:17 +0000 (GMT) Received: from dev.lan.Awfulhak.org (brian@dev.lan.Awfulhak.org [172.16.0.5]) by gw.Awfulhak.org (8.14.3/8.14.3) with ESMTP id n7R6eFlZ097230; Wed, 26 Aug 2009 23:40:15 -0700 (PDT) (envelope-from brian@FreeBSD.org) Date: Wed, 26 Aug 2009 23:40:09 -0700 From: Brian Somers To: freebsd-hackers@FreeBSD.org Message-ID: <20090826234009.13b90734@dev.lan.Awfulhak.org> In-Reply-To: <20090825034054.2d57e733@dev.lan.Awfulhak.org> References: <20090825034054.2d57e733@dev.lan.Awfulhak.org> X-Mailer: Claws Mail 3.7.2 (GTK+ 2.16.5; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/AXOUNzMX3Zufpwd.bjry.2J"; protocol="application/pgp-signature" Cc: Brian Somers , Ivan Radovanovic 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: Thu, 27 Aug 2009 07:09:15 -0000 --Sig_/AXOUNzMX3Zufpwd.bjry.2J Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Tue, 25 Aug 2009 03:40:54 -0700 Brian Somers wrote: > I recently closed bin/137647 and had second thoughts after Ivan (the > originator) challenged my reason for closing it. >=20 > 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... >=20 > 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. >=20 > Does anyone have any objections to doing this? I don't propose > merging this back into stable/8. To clarify, my proposal is to silently ignore the -w switch (any/all of the= m) and to remove the code that reads the terminal width and truncates some columns based on the result (or based on "132"). The pros: - ps's code becomes simpler. It was mentioned that the ps code is a minefield. This would remove a few mines. - ps IMHO has no business knowing about terminal widths (and where did the 132 column -w idea come from again?). Some programs such as iostat have similar (but way more broken) behaviour however whilst others such as ls do not. - We remove the sizing bugs (only some columns are truncation victims). The cons: - people with visual expectations would have to learn to use less -S or some similar tool. This breaks POLA. - Scripts may exist that depend on the behaviour without -w. Furthermore having to handle ps from both before and after such a change in one script can be painful. It was also suggested that rather than changing the behaviour of one flavour of ps it would be better to adopt an approach more like linux's or even implementing POSIXs suggestions. AFAIK the linux suggestion has been on the table for more time than I care to remember (wasn't Brett Glass going to provide a patch soon?). Although I haven't read the linux code, I'm pretty sure it's a scary place - perhaps this is the reason that we don't have those patches yet. Unless others have more to say on the subject, I think it's clear that the most popular vote is to do nothing. I think this is a shame as I find the pros more compelling than the cons, and I'm sure there are more than a few supporters out there on hackers@ that will stay silent. --=20 Brian Somers Don't _EVER_ lose your sense of humour ! --Sig_/AXOUNzMX3Zufpwd.bjry.2J Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (FreeBSD) iQCVAwUBSpYqTw7tvOdmanQhAQK5/wQAkuW3oq9q6IRChno5MdwFDKSUI33hj8R4 ZwffH/7SglEk8vQFnPk9awS3MqaHCQoFNxO1j+/qi7xiNE4yXXzQkFsaqkY8us1V 3CTYA9Tjrvx+J7LOQ8pDEtCwTYLvw0r/Y/e/wPhDP/iun3pziDSlu7Uvv/s7HuNM URCdiZzTCSk= =b6np -----END PGP SIGNATURE----- --Sig_/AXOUNzMX3Zufpwd.bjry.2J--