Date: Wed, 5 Jul 2000 01:39:45 +1000 (EST) From: Bruce Evans <bde@zeta.org.au> To: Bill Fumerola <billf@chimesnet.com> Cc: Sheldon Hearn <sheldonh@uunet.co.za>, arch@FreeBSD.ORG Subject: Re: truncate(1) implementation details Message-ID: <Pine.BSF.4.21.0007050115421.16391-100000@besplex.bde.org> In-Reply-To: <20000704013140.F4034@jade.chc-chimes.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 4 Jul 2000, Bill Fumerola wrote: > On Tue, Jul 04, 2000 at 03:16:37PM +1000, Bruce Evans wrote: > > > > > Use EXIT_SUCCESS and EXIT_FAILURE for exit() and EX_* for > > > > errx(). > > > > > > yes :) > > > > No. Use EXIT_* for errx() too. Magic error exit codes are especially > > useless when a human-readable error message is printed. > > Just to butt into this conversation... > > I know this from my dealings with the Teachings of Bruce, but style(9) > dictates that exit() use the sysexits(3) when appropriate. > > I can see where people could be confused. This is a bug in style(9) IMHO. It was introduced in rev.1.5: | Index: style.9 | =================================================================== | RCS file: /home/ncvs/src/share/man/man9/style.9,v | retrieving revision 1.4 | retrieving revision 1.5 | diff -r1.4 -r1.5 | 216,221c238,247 | < | < /* | < * Exits should be 0 on success, and 1 on failure. Don't denote | < * all the possible exit points, using the integers 1 through 300. | < */ | < exit(0); /* Avoid obvious comments such as "Exit 0 on success." */ | --- | > .Ed | > .Pp | > Exits should be 0 on success, or according to the predefined | > values in | > .Xr sysexits 3 . | > .Bd -literal -offset 0i | > exit(EX_OK); /* | > * Avoid obvious comments such as | > * "Exit 0 on success." | > */ Other bugs in this include uglier formatting of the comment and the comment no longer echoing the code. In 4.4BSDLite-2, <sysexits.h> is only used in rmail, mail.local, sccs, and in a few contrib'ed sources (bind, kermit, rcs, rtld and mh). Similarly in BSD/OS4.1. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0007050115421.16391-100000>