Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Process::stop() might not work as expected #5030

Closed
@schmittjoh

Description

@schmittjoh

Since PHP internally executes all commands using sh -c "original cmd" a call to ->stop() does not actually stop our process, but instead stops sh -c while the real process can still continue running.

I'm not sure what the best fix is here, we could add an exec call in front of the command to remove the sh -c wrapper and directly control our process.

Another improvement in the stop() method would be to send a final SIGKILL signal if the process does not terminate after sending SIGTERM. But that would only make sense if we actually send this signal to the real process, not to the wrapper.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions