-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
Expose valid signal set (sigfillset()): add signal.valid_signals() #77513
Comments
See bpo-33329: it would be nice to expose a signal module function to get the set of user-actionable signals. Hopefully sigfillset() does that. |
FYI on Fedora 27, I get: >>> signal.NSIG
65
>>> set(range(0, signal.NSIG)) - signal.valid_signals()
{0, 33, 32}
>>> len(signal.valid_signals())
62
>>> min(signal.valid_signals())
<Signals.SIGHUP: 1>
>>> max(signal.valid_signals())
<Signals.SIGRTMAX: 64> So signals 0, 32 and 33 are invalid, the first valid signal is 1 and the last is 64. |
On Ubuntu 14.04, I get the same results as Victor. |
This is expected, see bpo-33329. |
+ if (sigemptyset(&mask) || sigfillset(&mask)) { I'm not sure that sigemptyset() is needed. sigfillset() manual page:
The function is used to *initialize* a set. |
Yes, but we're not losing anything by being overly cautious. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: