Skip to content
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

Readding accidently removed std::abort #3238

Merged
merged 1 commit into from Mar 15, 2018
Merged

Readding accidently removed std::abort #3238

merged 1 commit into from Mar 15, 2018

Conversation

sithhell
Copy link
Member

This abort was removed with #3188.

Any background context you want to provide?

Without this change, applications can not be stopped by for example hitting ctrl+c or when an exception occurs.

Copy link
Member

@hkaiser hkaiser left a comment

Choose a reason for hiding this comment

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

These std::abort calls were removed on purpose. The rationale is that the application is going to be terminated at that point anyways. Do you have a use case where those are needed?

@sithhell
Copy link
Member Author

sithhell commented Mar 14, 2018 via email

@hkaiser
Copy link
Member

hkaiser commented Mar 14, 2018

Yes, my use case is a application running in a terminal that I want to end with Ctrl+C. This is currently broken. As well as applications with segfaults (or other signals). They go on forever.

Ok, then this should be re-added for non-windows systems only as there we're sure that the process is being terminated once we reach that point in the execution.

@sithhell
Copy link
Member Author

Really? If the termination handler doesn't abort, the process won't continue to run? That sounds odd to me ...
I guess what we rather want to have is to move the abort into the if statement to not cause the python application to abort in that case?

@hkaiser
Copy link
Member

hkaiser commented Mar 14, 2018

On Windows, if the termination handler returns TRUE, then no other handler functions are called and the system terminates the process (see: https://docs.microsoft.com/en-us/windows/console/handlerroutine).

This abort was removed with #3188.
@sithhell
Copy link
Member Author

Thanks @hkaiser for the explanation. I pushed a new version of the changes removing std::abort for windows.

Copy link
Member

@hkaiser hkaiser left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@msimberg msimberg merged commit b5eb00f into master Mar 15, 2018
@msimberg msimberg deleted the readd_abort branch March 15, 2018 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants