mirror of
https://github.com/danog/process.git
synced 2024-12-02 17:51:46 +01:00
Add guard for proc_terminate
This commit is contained in:
parent
8aabd17000
commit
dcc691ea14
@ -144,7 +144,7 @@ final class Runner implements ProcessRunner {
|
||||
/** @inheritdoc */
|
||||
public function destroy(ProcessHandle $handle) {
|
||||
/** @var Handle $handle */
|
||||
if ($handle->status < ProcessStatus::ENDED) {
|
||||
if ($handle->status < ProcessStatus::ENDED && \is_resource($handle->proc)) {
|
||||
try {
|
||||
$this->kill($handle);
|
||||
} catch (ProcessException $e) {
|
||||
|
Loading…
Reference in New Issue
Block a user