Skip to content

Have Windows Call Signaled Callback on Crashes #23018

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
Mar 2, 2019

Conversation

gmittert
Copy link
Contributor

@gmittert gmittert commented Mar 1, 2019

The signaled callback is treated more as a general crash handler clean
up wise. While it doesn't 100% line up, have Windows call the signaled
callback on exit codes considered to be errors.

See #22985 (comment)

@gmittert
Copy link
Contributor Author

gmittert commented Mar 1, 2019

@jrose-apple

Copy link
Contributor

@jrose-apple jrose-apple left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

// Wait() returning a return code of -2 indicates the process received
// a signal during execution.
if (ReturnCode == -2) {
#endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: I dislike #ifs that don't surround a whole unit of AST. Mind factoring this out into a boolean?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

The signaled callback is treated more as a general crash handler clean
up wise. While it doesn't 100% line up, have Windows call the signaled
callback on exit codes considered to be errors.
@jrose-apple
Copy link
Contributor

@swift-ci Please smoke test

@jrose-apple jrose-apple self-assigned this Mar 1, 2019
@jrose-apple jrose-apple merged commit b895f0c into swiftlang:master Mar 2, 2019
@gmittert gmittert deleted the ThatsAGoodSignal branch March 11, 2019 23:40
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.

2 participants