-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[Console] Make sure signals registered by SignalableCommandInterface commands are defined in the PCNTL extension
#49822
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
Conversation
94382f1 to
79bb9bd
Compare
|
Are we sure the signal list is finite? |
|
@lyrixx I tried this snippet: <?php
function sig_handler($signo)
{
switch ($signo) {
default:
}
}
echo "Installing signal handler";
// setup signal handlers
pcntl_signal(66, "sig_handler");And here is the result: So we should at least check that the signal number is lower than 65. |
|
I think we should not enforce something that PHP allow. So 👍 with checking only if the number is lower than 65 |
src/Symfony/Component/Console/SignalRegistry/SignalRegistry.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Console/SignalRegistry/SignalRegistry.php
Outdated
Show resolved
Hide resolved
79bb9bd to
3430e1e
Compare
|
I updated the I also added a few tests for |
…` commands are defined in the PCNTL extension
f386e40 to
3da83d0
Compare
…n messages (alexandre-daubois) This PR was merged into the 6.3 branch. Discussion ---------- [Console][DoctrineBridge] Remove backticks from exception messages | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | _NA_ | License | MIT | Doc PR | _NA_ Follow-up of #49822 (comment), removes backticks of a few exception messages. Commits ------- 1c4b9e6 [Console][DoctrineBridge][PhpUnitBridge] Remove backticks from exception messages
So, there is no need to add code to handle this, since the engine already has an appropriate behavior for invalid signals, isn't it? |
|
less code == less bug. I agree with @nicolas-grekas |
Makes me think that adding a similar method to check a signal existence as a string in
SignalRegistrycould be leveraged in #49750