[Process] Fix tests when pcntl is not available.

This commit is contained in:
Jakub Zalas 2014-07-31 22:38:34 +01:00
parent a292a489c5
commit e40f24f0a9
1 changed files with 2 additions and 2 deletions

View File

@ -167,7 +167,7 @@ class SimpleProcessTest extends AbstractProcessTest
$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) {
@ -183,7 +183,7 @@ class SimpleProcessTest extends AbstractProcessTest
$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) {