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
Consider phpdbg as cli #3534
Consider phpdbg as cli #3534
Conversation
* When configuring extensions, considers the PHPDBG SAPI as CLI thus allowing e.g. to have the pcntl extension available within PHPDBG. Signed-off-by: Samuele Kaplun <kaplun@protonmail.com>
Comment on behalf of petk at php.net: Labelling |
Because phpdbg implements it's own loop, and because pcntl may rely on the interrupt check, and because the interrupt check has no exported API for phpdbg to use, it doesn't really make sense to merge this - in other words, pcntl cannot be fully supported by phpdbg. |
@krakjoe Which API needs to be exported to make this work? |
Interrupt check |
@krakjoe Not following. The only part I can see that needs to be exported is zend_interrupt_function, and it already is. |
On enter the VM does ZEND_VM_INTERRUPT_CHECK, in the loop it does ZEND_VM_LOOP_INTERRUPT_CHECK, they are both the same, one would assume that since the external loop prohibits entry with VM_ENTER, and since the external loop cannot invoke anything like ZEND_VM_LOOP_INTERRUPT_CHECK, that breaks the interrupt (at least somewhat) ? |
@krakjoe Those macros don't do much more than check the interrupt flag and call the interrupt handler though. It should be possible to just replicate those couple lines of code in phpdbg. |
They dispatch to a helper, which may timeout, or must check/invoke interrupt function ... there's no way to do the same kind of dispatch to the helper, is there ? |
Merged as 79f046f Sorry about the noise ... Cheers |
allowing e.g. to have the pcntl extension available within PHPDBG.
Signed-off-by: Samuele Kaplun kaplun@protonmail.com