Symfony\Component\Process\Process::hasBeenSignaled PHP Method

hasBeenSignaled() public method

It always returns false on Windows.
public hasBeenSignaled ( ) : boolean
return boolean
    public function hasBeenSignaled()
    {
        $this->requireProcessIsTerminated(__FUNCTION__);
        if (!$this->enhanceSigchildCompatibility && $this->isSigchildEnabled()) {
            throw new RuntimeException('This PHP has been compiled with --enable-sigchild. Term signal can not be retrieved.');
        }
        return $this->processInformation['signaled'];
    }

Usage Example

Example #1
0
 public function testStop()
 {
     $process = new Process('php -r "while (true) {}"');
     $process->start();
     $this->assertTrue($process->isRunning());
     $process->stop();
     $this->assertFalse($process->isRunning());
     // skip this check on windows since it does not support signals
     if (!defined('PHP_WINDOWS_VERSION_MAJOR')) {
         $this->assertTrue($process->hasBeenSignaled());
     }
 }
All Usage Examples Of Symfony\Component\Process\Process::hasBeenSignaled