ext/pcntl pcntl_signal_get_handler update.#13902
Closed
devnexen wants to merge 2 commits intophp:masterfrom
Closed
ext/pcntl pcntl_signal_get_handler update.#13902devnexen wants to merge 2 commits intophp:masterfrom
devnexen wants to merge 2 commits intophp:masterfrom
Conversation
00a4b09 to
752fea8
Compare
ndossche
reviewed
Apr 7, 2024
The situation varies from platform to another, thus taking in account the complexity of it.
752fea8 to
3dc007e
Compare
ndossche
reviewed
Apr 7, 2024
ext/pcntl/pcntl.c
Outdated
| if (signo < 1 || signo > 32) { | ||
| zend_argument_value_error(1, "must be between 1 and 32"); | ||
| // note: max signal on mac is SIGUSR2 (31), no real time signals. | ||
| static int sigmax = NSIG - 1; |
Member
There was a problem hiding this comment.
I think I'd prefer a non-static variable here. Otherwise we have it in a data section that's shared with other threads too.
The compiler will constant-fold and take care of the branch at compile-time anyway.
Member
Author
There was a problem hiding this comment.
I wish we had constexpr in C :-) but sure will change.
Member
There was a problem hiding this comment.
I wish we had constexpr in C :-)
That's in C23 ;) But sadly we don't even have C11 yet in PHP
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.
The situation varies from platform to another, thus taking in account the complexity of it.