Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Consider phpdbg as cli #3534

wants to merge 1 commit into from

Conversation

kaplun
Copy link
Contributor

@kaplun kaplun commented Sep 18, 2018

  • 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

* 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>
@php-pulls
Copy link

Comment on behalf of petk at php.net:

Labelling

@krakjoe
Copy link
Member

krakjoe commented Mar 27, 2019

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 krakjoe closed this Mar 27, 2019
@nikic
Copy link
Member

nikic commented Mar 27, 2019

@krakjoe Which API needs to be exported to make this work?

@krakjoe
Copy link
Member

krakjoe commented Mar 27, 2019

Interrupt check

@nikic
Copy link
Member

nikic commented Mar 27, 2019

@krakjoe Not following. The only part I can see that needs to be exported is zend_interrupt_function, and it already is.

@krakjoe
Copy link
Member

krakjoe commented Mar 27, 2019

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) ?

@nikic
Copy link
Member

nikic commented Mar 27, 2019

@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.

@krakjoe
Copy link
Member

krakjoe commented Mar 27, 2019

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 ?

@krakjoe krakjoe reopened this Mar 27, 2019
@krakjoe
Copy link
Member

krakjoe commented Mar 27, 2019

Merged as 79f046f

Sorry about the noise ...

Cheers
Joe

@krakjoe krakjoe closed this Mar 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants