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

Skip to content

[Process] Getting a "Process has been signaled" exception when calling $process->stop() #11286

Closed
@OwlyCode

Description

@OwlyCode

Hello,

I'm using Process to watch a log and stop when a specific string is seen in it. It looks like this :

$process = new Process('tail -f /var/log/doge.log');
$process->run(function ($type, $buffer) use ($process) {
    if (strpos($buffer, 'some text to wait for') !== false) {
        $process->stop();
    }
});

It works but when stopping the process I'm getting this :

[Symfony\Component\Process\Exception\RuntimeException]  
  The process has been signaled with signal "15".  

Maybe we should'nt throw this exception when stop has been explicitly called.

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