Include real-time signals (SIGRTMIN..SIGRTMAX) in SIGNUMS#1719
Open
krrishapatel wants to merge 1 commit into
Open
Include real-time signals (SIGRTMIN..SIGRTMAX) in SIGNUMS#1719krrishapatel wants to merge 1 commit into
krrishapatel wants to merge 1 commit into
Conversation
On Linux, signal numbers SIGRTMIN through SIGRTMAX (typically 34-64) are valid but have no named constants in the signal module. The existing list comprehension only collects SIG* attributes, causing signal_number() to reject real-time signals with "not a valid signal number". Extend SIGNUMS with the SIGRTMIN..SIGRTMAX range when those attributes are available.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On Linux, real-time signal numbers (SIGRTMIN through SIGRTMAX, typically 34-64) are valid signals that processes can send and receive. However,
signal_number()rejects them becauseSIGNUMSis built solely from namedSIG*attributes in thesignalmodule, and real-time signals don't have individual named constants.This extends
SIGNUMSwith the full SIGRTMIN..SIGRTMAX range when those attributes are available (Linux only — macOS/Windows don't have real-time signals).Fixes #1703
Changes
supervisor/datatypes.py: Conditionally extendSIGNUMSwith the real-time signal rangesupervisor/tests/test_datatypes.py: Add two tests for SIGRTMIN/SIGRTMAX acceptance (skipped on platforms without real-time signals)