Skip to content

Use exit 2 on crash to signal this is no ordinary error - #5987

Merged
gvanrossum merged 1 commit into
python:masterfrom
gvanrossum:exit-2-on-crash
Dec 2, 2018
Merged

gvanrossum merged 1 commit into
python:masterfrom
gvanrossum:exit-2-on-crash

Conversation

@gvanrossum

@gvanrossum gvanrossum commented Dec 1, 2018 •

Copy link
Copy Markdown
Member

The wrapper script we use to run mypy at Dropbox will greatly benefit from this -- it will be able to distinguish between a crash and type-checking errors.

@gvanrossum
gvanrossum requested a review from msullivan December 1, 2018 22:55
@srittau

srittau commented Dec 1, 2018

Copy link
Copy Markdown
Contributor

One small suggestion: Use an "abnormal" return value like 255 for crashes. This leaves the door open for distinguishing between several "normal" types of type-checking errors at a later date. (For example, syntax errors vs. type errors.)

@gvanrossum

Copy link
Copy Markdown
Member Author

Use an "abnormal" return value like 255 for crashes.

I'm not a big fan of that -- there's no standard for such error codes, while using 2 for "not even wrong" types of errors is at least an old tradition. See also #5982.

@gvanrossum
gvanrossum merged commit 4f2a88d into python:master Dec 2, 2018
@gvanrossum
gvanrossum deleted the exit-2-on-crash branch December 2, 2018 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants