-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-23325: Turn signal.SIG_DFL and signal.SIG_IGN into functions. #8920
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
bpo-23325: Turn signal.SIG_DFL and signal.SIG_IGN into functions. #8920
Conversation
These singletons are no longer integers. They are now copyable and pickleable and have docstrings.
Why should SIG_IGN raise an error when called instead of doing nothing, which is what happens when SIG_IGN is actually supplied as a signal handler? |
Because currently calling |
Hmm, the problem is this will break code such as: handler = signal.getsignal(signum)
if callable(handler):
# Do something, e.g. call the handler |
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.
This has merge conflicts now.
When you're done making the requested changes, leave the comment: |
Victor closed the issue, so I'll close the PR too. |
These singletons are no longer integers.
They are now copyable and pickleable and have docstrings.
https://bugs.python.org/issue23325