-
-
Notifications
You must be signed in to change notification settings - Fork 32k
signal.SIGCLD alias is not available on OSX #89414
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
Comments
The module attribute signal.SIGCLD (https://docs.python.org/3/library/signal.html#signal.SIGCLD) is an "archaic" (quoting from the GNU C Library source) alias for signal.SIGCHLD (https://docs.python.org/3/library/signal.html#signal.SIGCHLD). signal.SIGCHLD is documented as being available on unix, and signal.SIGCLD is documented as an alias of signal.SIGCHLD. However, it seems that clang does not define the SIGCLD back-compatibility name [1] so the SIGCLD alias is missing on OSX (all the way to at least 2.7) because the clang headers appear to not define the SIGCLD macro and hence the logic in modulesignal.c does not find it, and hence the rest of the tooling in signal.py does not find it. I am not sure if the correct fix is to document that SIGCLD in only available on linux (which I am not sure is completely correct, maybe "availability is platform dependent, but definitely not on darwin"?) or to add the macro if SIGCHLD is defined and SIGCLD is missing (see attached patch) [1] SIGCLD is not documented in https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/signal.3.html and not the signal.h that ships with xcode |
The documentation for the SIG* constants also mentions: ---- This is however mentioned halfway through the list of constants. I'm not sure why this is so, IMHO it would be clearer to move the fragment I quote to the start of the module constants section. We shouldn't define SIGCLD on platforms that don't have this name available in their libc headers, which includes macOS. If the fragment above were moved to the start of the section no further updates would be required (IMHO). |
Document that SIGCLD is not available on macOS
…nGH-113580) Document that SIGCLD is not available on macOS (cherry picked from commit f48a1bc) Co-authored-by: Ronald Oussoren <[email protected]>
…nGH-113580) Document that SIGCLD is not available on macOS (cherry picked from commit f48a1bc) Co-authored-by: Ronald Oussoren <[email protected]>
…n#113580) Document that SIGCLD is not available on macOS
…n#113580) Document that SIGCLD is not available on macOS
…n#113580) Document that SIGCLD is not available on macOS
Uh oh!
There was an error while loading. Please reload this page.
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:
Linked PRs
The text was updated successfully, but these errors were encountered: