[tor-dev] When to exit 0 on error
f55jwk4f at vfemail.net
f55jwk4f at vfemail.net
Sat Jun 24 04:38:50 UTC 2017
On Fri, Jun 23, 2017 at 10:29:32AM -0400, Zack Weinberg wrote:
> On Fri, Jun 23, 2017 at 9:29 AM, Nick Mathewson <nickm at alum.mit.edu> wrote:
> > On Thu, Jun 22, 2017 at 10:49 PM, <f55jwk4f at vfemail.net> wrote:
> >> I noticed tor sometimes exits 0 on error
> >> [...]
> >> When to exit 0 on error?
> >
> > When the error is unrecoverable, and continuing would be worse then exiting.
>
> I don't think the question was "when is it appropriate to _exit_ on
> error?" I think it was "when is it appropriate to exit _0_ (i.e.
> apparently successfully) on error?"
>
> My expectation would be that exit(0) on fatal error is presumptively a
> minor bug, it should be exit(1), and if there is some compelling
> reason to exit successfully in a particular error case, there ought to
> be a comment explaining that reason.
>
> zw
Yes. I mean why to exit success instead of failure. But I don't know
if those cases are typos, because there are 2 such cases, and a typo
like that can be easily spotted in a review.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.torproject.org/pipermail/tor-dev/attachments/20170624/2474068f/attachment.sig>
More information about the tor-dev
mailing list