public function AbstractProcessTest::testSignal

3 calls to AbstractProcessTest::testSignal()
SigchildDisabledProcessTest::testSignal in drupal/core/vendor/symfony/process/Symfony/Component/Process/Tests/SigchildDisabledProcessTest.php
@expectedException Symfony\Component\Process\Exception\RuntimeException
SigchildEnabledProcessTest::testSignal in drupal/core/vendor/symfony/process/Symfony/Component/Process/Tests/SigchildEnabledProcessTest.php
@expectedException Symfony\Component\Process\Exception\RuntimeException
SimpleProcessTest::testSignal in drupal/core/vendor/symfony/process/Symfony/Component/Process/Tests/SimpleProcessTest.php
3 methods override AbstractProcessTest::testSignal()
SigchildDisabledProcessTest::testSignal in drupal/core/vendor/symfony/process/Symfony/Component/Process/Tests/SigchildDisabledProcessTest.php
@expectedException Symfony\Component\Process\Exception\RuntimeException
SigchildEnabledProcessTest::testSignal in drupal/core/vendor/symfony/process/Symfony/Component/Process/Tests/SigchildEnabledProcessTest.php
@expectedException Symfony\Component\Process\Exception\RuntimeException
SimpleProcessTest::testSignal in drupal/core/vendor/symfony/process/Symfony/Component/Process/Tests/SimpleProcessTest.php

File

drupal/core/vendor/symfony/process/Symfony/Component/Process/Tests/AbstractProcessTest.php, line 455

Class

AbstractProcessTest
@author Robert Schönthal <seroscho@googlemail.com>

Namespace

Symfony\Component\Process\Tests

Code

public function testSignal() {
  if (defined('PHP_WINDOWS_VERSION_BUILD')) {
    $this
      ->markTestSkipped('POSIX signals do not work on windows');
  }
  $process = $this
    ->getProcess('exec php -f ' . __DIR__ . '/SignalListener.php');
  $process
    ->start();
  usleep(500000);
  $process
    ->signal(SIGUSR1);
  while ($process
    ->isRunning() && false === strpos($process
    ->getoutput(), 'Caught SIGUSR1')) {
    usleep(10000);
  }
  $this
    ->assertEquals('Caught SIGUSR1', $process
    ->getOutput());
}