From 1c8bf5e04c6c64a80a117c06ade525fcc8c58ff3 Mon Sep 17 00:00:00 2001 From: Niklas Keller Date: Wed, 25 Jul 2018 22:36:28 +0200 Subject: [PATCH] Await process termination @ kill --- lib/Process.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/Process.php b/lib/Process.php index 1ba986b..60f8650 100644 --- a/lib/Process.php +++ b/lib/Process.php @@ -130,6 +130,12 @@ class Process } $this->processRunner->kill($this->handle); + + try { + $this->processRunner->join($this->handle); + } catch (\Throwable $e) { + // ignore here + } } /**