Skip to content

Commit

Permalink
[Process] Fix tests when pcntl is not available.
Browse files Browse the repository at this point in the history
  • Loading branch information
jakzal committed Aug 1, 2014
1 parent a292a48 commit e40f24f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Symfony/Component/Process/Tests/SimpleProcessTest.php
Expand Up @@ -167,7 +167,7 @@ public function testKillSignalTerminatesProcessCleanly()
$process = $this->getProcess('php -r "echo \'foo\'; sleep(1); echo \'bar\';"');
$process->run(function () use ($process) {
if ($process->isRunning()) {
$process->signal(SIGKILL);
$process->signal(defined('SIGKILL') ? SIGKILL : 9);
}
});
} catch (RuntimeException $e) {
Expand All @@ -183,7 +183,7 @@ public function testTermSignalTerminatesProcessCleanly()
$process = $this->getProcess('php -r "echo \'foo\'; sleep(1); echo \'bar\';"');
$process->run(function () use ($process) {
if ($process->isRunning()) {
$process->signal(SIGTERM);
$process->signal(defined('SIGTERM') ? SIGTERM : 15);
}
});
} catch (RuntimeException $e) {
Expand Down

0 comments on commit e40f24f

Please sign in to comment.