bpo-45643: Add signal.SIGSTKFLT on platforms where this is defined. #29266
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.
Background
On Linux,
man 7 signal
includesSIGSTKFLT
in its table of "various other signals":Here
-,16,-
means that the signal is defined with the value 16 on x86 and ARM but not on Alpha, SPARC or MIPS. I believe that the intention was to useSIGSTKFLT
for stack faults on the x87 math coprocessor, but this was either removed or never implemented, so that the signal is defined in /usr/include/signal.h but not used by the Linux kernel.Use case
SIGSTKFLT
is one of a handful of signals that are not used by the kernel, so that user-space programs are free to use it for their own purposes, for example for inter-thread or inter-process pre-emptive communication.Accordingly, it would be nice if the name
SIGSTKFLT
were available in the Python signal module on the platforms where the signal is available, for use and reporting in these cases.Note
I didn't add any test coverage because there isn't any behaviour to cover -- the generic behaviour will be covered by
GenericTests.test_enums()
in Lib/test/test_signal.py. I did check by hand that the signal was defined with the correct value:https://bugs.python.org/issue45643