From owner-svn-src-head@FreeBSD.ORG Sat Jul 6 18:42:29 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B126567D; Sat, 6 Jul 2013 18:42:29 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id 7C0721FE2; Sat, 6 Jul 2013 18:42:29 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id A0CC8402; Sat, 6 Jul 2013 20:37:45 +0200 (CEST) Date: Sat, 6 Jul 2013 20:42:49 +0200 From: Pawel Jakub Dawidek To: Bruce Evans Subject: Re: svn commit: r252672 - head/sbin/nvmecontrol Message-ID: <20130706184249.GD25842@garage.freebsd.pl> References: <201307040026.r640QOCd079203@svn.freebsd.org> <20130704105843.B982@besplex.bde.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mJm6k4Vb/yFcL9ZU" Content-Disposition: inline In-Reply-To: <20130704105843.B982@besplex.bde.org> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, Jim Harris , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jul 2013 18:42:29 -0000 --mJm6k4Vb/yFcL9ZU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 04, 2013 at 11:44:28AM +1000, Bruce Evans wrote: > Many style bugs are visible in this patch: [...] > - sysexits.h is used [...] Bruce, until sysexits(3) doesn't explicitly say it shouldn't be used, please stop calling this a bug, because you are just confusing people. At this point sysexits(3) actually even suggests it is blessed by style(9). This is how it starts: According to style(9), it is not a good practice to call exit(3) with arbitrary values to indicate a failure condition when ending a program. Instead, the pre-defined exit codes from sysexits should be used, so the caller of the process can get a rough estimation about the failure class without looking up the source code. In my personal opinion it doesn't hurt to use sysexits(3) - if you don't want to interpret exit status then treat every value !=3D 0 as an error. In HAST (IIRC) I do interpret exit status - if I get EX_TEMPFAIL, I know I can try to restart the process, if I get something else I don't restart it, as I risk an infinite loop. Apart from my personal opinion, if you want to call it a bug and not confuse people, then start discussion and change the manual page to recommend avoiding sysexits(3). As of now we are just sending mixed signals and create confusion. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://mobter.com --mJm6k4Vb/yFcL9ZU Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iEYEARECAAYFAlHYZSkACgkQForvXbEpPzSmCACfcmIPcu2kOTW0gFLjEyD2TM2v +oUAn0SY1J/FQ7FQ0YJLCPzJEO7cxtTm =2Pp6 -----END PGP SIGNATURE----- --mJm6k4Vb/yFcL9ZU--