Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 2, 2018

Conversation

gvanrossum
Copy link
Member

@gvanrossum gvanrossum commented Dec 1, 2018

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
Copy link
Contributor

srittau commented Dec 1, 2018

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
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