diff --git a/src/Zen/BaseZen.php b/src/Zen/BaseZen.php index 104a002..552ca13 100644 --- a/src/Zen/BaseZen.php +++ b/src/Zen/BaseZen.php @@ -55,7 +55,7 @@ public function close() $this->deferred->resolve(); if ($this->process !== null && $this->process->isRunning()) { - $this->process->terminate(SIGKILL); + $this->process->terminate(defined('SIGKILL') ? SIGKILL : null); // explicitly close all streams immediately $this->process->stdin->close(); diff --git a/tests/Zen/FunctionalBaseZenTest.php b/tests/Zen/FunctionalBaseZenTest.php index ba2aa3d..1242d25 100644 --- a/tests/Zen/FunctionalBaseZenTest.php +++ b/tests/Zen/FunctionalBaseZenTest.php @@ -76,7 +76,7 @@ public function testTerminatingProcessReturnsError() $zen->go($process); $this->loop->addTimer(0.1, function() use ($process) { - $process->terminate(SIGKILL); + $process->terminate(defined('SIGKILL') ? SIGKILL : null); $process->stdin->end(); });