diff --git a/Spawn/Future.php b/Spawn/Future.php index 23817ce..af08ee8 100644 --- a/Spawn/Future.php +++ b/Spawn/Future.php @@ -540,8 +540,10 @@ public function isTerminated(): bool { if ($this->process instanceof \UVProcess) return ($this->status === false) || \is_string($this->status); + elseif ($this->process instanceof Process) + return $this->process->isTerminated(); - return $this->process instanceof Process && $this->process->isTerminated(); + return $this->status === false || \is_string($this->status); } public function isStarted(): bool