-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Reinstall signal handler when Python signal handler called #228
base: main
Are you sure you want to change the base?
Conversation
24aa6c2
to
231c981
Compare
These two tests are failing: The test can be fixed by adding appropriate On the other hand a test could be added. It could be as simple as
|
231c981
to
df2b512
Compare
The point of having a os-level interrupt handler is to rollback the process (using longjmp) to a state where the python signal handler can be called. IOW, I don't think this will fix anything until the python handler is called; the problem is when the python handler is NOT called (this is the reason why cysignals needs to use a os-level interrupt handler). I think there's something special about
I believe the only way to fix this is for matplotlib to restore the os-level interrupt handler. See prompt-toolkit/python-prompt-toolkit#1576 for a similar issue and prompt-toolkit/python-prompt-toolkit#1822 for the fix. A different workaround might be to make sure the signal handler is correctly installed at each prompt (I'm not sure ipython has a hook for that... I think prompt_toolkit has it, but we don't use prompt_toolkit directly afair). This would not be good for scripts but at least an improvement for interactive use. |
|
This would fix sagemath/sage#39601 . Not sure if it has any downside.