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

Reinstall signal handler when Python signal handler called #228

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

user202729
Copy link
Contributor

@user202729 user202729 commented Feb 27, 2025

This would fix sagemath/sage#39601 . Not sure if it has any downside.

@user202729 user202729 marked this pull request as draft February 27, 2025 18:15
@user202729 user202729 force-pushed the reinstall-signal-handler branch 2 times, most recently from 24aa6c2 to 231c981 Compare February 28, 2025 03:55
@user202729
Copy link
Contributor Author

user202729 commented Feb 28, 2025

These two tests are failing: test_interrupt_bomb and test_sig_block_outside_sig_on.

The test can be fixed by adding appropriate PyErr_CheckSignals , but that feels like fixing the symptoms.

On the other hand a test could be added. It could be as simple as

import signal
from signal import SIGINT
signal.signal(SIGINT, signal.getsignal(SIGINT))

@user202729 user202729 force-pushed the reinstall-signal-handler branch from 231c981 to df2b512 Compare February 28, 2025 03:59
@user202729 user202729 marked this pull request as ready for review February 28, 2025 03:59
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.

Interruption breaks after matplotlib plt.pause()
1 participant