Date: Sat, 6 Jul 2013 20:42:49 +0200 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: Bruce Evans <brde@optusnet.com.au> Cc: svn-src-head@FreeBSD.org, Jim Harris <jimharris@FreeBSD.org>, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r252672 - head/sbin/nvmecontrol Message-ID: <20130706184249.GD25842@garage.freebsd.pl> In-Reply-To: <20130704105843.B982@besplex.bde.org> References: <201307040026.r640QOCd079203@svn.freebsd.org> <20130704105843.B982@besplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130706184249.GD25842>