[tor-dev] When to exit 0 on error

Zack Weinberg zackw at panix.com
Sat Jun 24 20:40:49 UTC 2017


On Sat, Jun 24, 2017 at 12:38 AM,  <f55jwk4f at vfemail.net> wrote:
> On Fri, Jun 23, 2017 at 10:29:32AM -0400, Zack Weinberg wrote:
>>
>> 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.
>
> 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.

Yes, but a typo like that can also be easily *missed* in a review; you
read what ought to be there instead of what is.

zw


More information about the tor-dev mailing list