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

Skip to content

Commit e40f24f

Browse files
committed
[Process] Fix tests when pcntl is not available.
1 parent a292a48 commit e40f24f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/Process/Tests/SimpleProcessTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public function testKillSignalTerminatesProcessCleanly()
167167
$process = $this->getProcess('php -r "echo \'foo\'; sleep(1); echo \'bar\';"');
168168
$process->run(function () use ($process) {
169169
if ($process->isRunning()) {
170-
$process->signal(SIGKILL);
170+
$process->signal(defined('SIGKILL') ? SIGKILL : 9);
171171
}
172172
});
173173
} catch (RuntimeException $e) {
@@ -183,7 +183,7 @@ public function testTermSignalTerminatesProcessCleanly()
183183
$process = $this->getProcess('php -r "echo \'foo\'; sleep(1); echo \'bar\';"');
184184
$process->run(function () use ($process) {
185185
if ($process->isRunning()) {
186-
$process->signal(SIGTERM);
186+
$process->signal(defined('SIGTERM') ? SIGTERM : 15);
187187
}
188188
});
189189
} catch (RuntimeException $e) {

0 commit comments

Comments
 (0)