From owner-freebsd-bugs@FreeBSD.ORG Wed Mar 24 18:35:24 2010 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E56B106566B for ; Wed, 24 Mar 2010 18:35:24 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail07.syd.optusnet.com.au (mail07.syd.optusnet.com.au [211.29.132.188]) by mx1.freebsd.org (Postfix) with ESMTP id AD6168FC12 for ; Wed, 24 Mar 2010 18:35:23 +0000 (UTC) Received: from besplex.bde.org (c122-106-174-6.carlnfd1.nsw.optusnet.com.au [122.106.174.6]) by mail07.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o2OIZKpf030518 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 25 Mar 2010 05:35:21 +1100 Date: Thu, 25 Mar 2010 05:35:20 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Garrett Cooper In-Reply-To: <7d6fde3d1003231242i4c33fb1erbc5492a9d3db0219@mail.gmail.com> Message-ID: <20100325052429.F739@besplex.bde.org> References: <201003220940.o2M9e21m037918@freefall.freebsd.org> <20100324062626.C5129@delplex.bde.org> <7d6fde3d1003231242i4c33fb1erbc5492a9d3db0219@mail.gmail.com> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-716436367-1269455720=:739" Cc: Garrett Cooper , freebsd-bugs@freebsd.org, Bruce Evans Subject: Re: bin/121165: pkg_add(1) prints a weird message: PKG_TMPDIR environment variable to a location with at least 0 bytes X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Mar 2010 18:35:24 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-716436367-1269455720=:739 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Tue, 23 Mar 2010, Garrett Cooper wrote: > On Tue, Mar 23, 2010 at 12:26 PM, Bruce Evans wrot= e: >> On Mon, 22 Mar 2010, Garrett Cooper wrote: >> >>> =A0 =A0Functions as expected provided test added in >>> http://p4web.freebsd.org/chv.cgi?CH=3D175930 ; I'm just making one mino= r >>> style change from the previous patch so that errx(3) in find_play_pen >>> exits with EXIT_FAILURE instead of 2 (I agree that EXIT_FAILURE is >>> synonymous to 2, but for it's more readable and consistent as >>> EXIT_FAILURE). >> >> EXIT_FAILURE is 1. > > Excellent point -_-... should I just revert this then or leave it as-is? Depends on whether distinguishing the exit code 2 from the exit code 1 is important. Normally it isn't, but sometimes 2 is documented and then at least the documentation should be changed too. BTW, I glanced at this because it looked a bit like use of sysexits and I don't like sysexits. But sysexits exit codes start at 64 and are almost perfectly undocumented in utilities that use sysexits. I don't mind using the Standard C EXIT_SUCCESS and EXIT_FAILURE although these are just aliases for 0 and 1 and these aliases are also almost perfectly undocumented (most man pages use the mdoc macro ".Ex -std" which expands to "The utility exits 0 on success, and >0 if an error occurs." POSIX also mostly says 0/>0. Thus the values in sysexits are allowed, but know one knows what they mean. Bruce --0-716436367-1269455720=:739--