-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add default interrupt handlers #13568
Add default interrupt handlers #13568
Conversation
On Windows this works when run alone: lib LibC
fun GenerateConsoleCtrlEvent(dwCtrlEvent : DWORD, dwProcessGroupId : DWORD) : BOOL
end
at_exit { print "Exiting" }
print "."
STDOUT.flush
LibC.GenerateConsoleCtrlEvent(LibC::CTRL_C_EVENT, 0)
sleep However it also sends Ctrl+C to the spec process itself, effectively aborting the spec. |
I suppose we could put that in |
Even a manual spec needs a functioning spec harness which doesn't work when the process gets cancelled from inside an example. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be noted that restore_interrupts!
does not restore this default interrupt handler (or maybe it should?)
This reverts commit 742d920.
Resolves #8687