Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 01 Dec 2008 12:21:07 +0100
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
To:        Stanislav Sedov <stas@FreeBSD.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Robert Watson <rwatson@freebsd.org>, Bruce Evans <brde@optusnet.com.au>
Subject:   Re: svn commit: r184509 - head/share/man/man9
Message-ID:  <864p1orvj0.fsf@ds4.des.no>
In-Reply-To: <20081201104920.4b001553.stas@FreeBSD.org> (Stanislav Sedov's message of "Mon, 1 Dec 2008 10:49:20 %2B0300")
References:  <200810311447.m9VElFtp083250@svn.freebsd.org> <20081101212937.D12448@delplex.bde.org> <20081201104920.4b001553.stas@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Stanislav Sedov <stas@FreeBSD.org> writes:
> What is the benefit of using a single error exit code which theoretically
> can't say anything about the type of the error instead of probably cryptic
> set of documented error coded that could be later decrypted and analyzed
> at least? For me the code using named error codes looks much cleaner, and
> as all exit codes >0 threated as error, it seems that using sysexits codes
> should not hurt. Do we totally againast them from now, or these exit codes
> still could be used?

sysexits is actually nothing more than the documented exit codes for
sendmail(8).  Practically nothing else uses them, except procmail
scripts, postfix filters and similar where you need to know if sendmail
(or another MTA's drop-in replacement) succeeded - and even those
usually only check for 75 (EX_TEMPFAIL).

I think we have one or two utilities with documented exit codes other
than 0 and 1.  Everything else just returns "0 on success, and >0 if an
error occurs"; we even have an mdoc macro (.Ex -std) for that exact
phrase.

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?864p1orvj0.fsf>