mirror of
https://github.com/danog/process.git
synced 2024-12-12 00:59:41 +01:00
Fix exit code watcher on Windows
This commit is contained in:
parent
4916378931
commit
f57648e278
@ -127,8 +127,10 @@ final class Runner implements ProcessRunner {
|
|||||||
throw new ProcessException("Terminating process failed");
|
throw new ProcessException("Terminating process failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->exitCodeWatcher !== null) {
|
||||||
Loop::cancel($handle->exitCodeWatcher);
|
Loop::cancel($handle->exitCodeWatcher);
|
||||||
$handle->exitCodeWatcher = null;
|
$handle->exitCodeWatcher = null;
|
||||||
|
}
|
||||||
|
|
||||||
$handle->status = ProcessStatus::ENDED;
|
$handle->status = ProcessStatus::ENDED;
|
||||||
$handle->joinDeferred->fail(new ProcessException("The process was killed"));
|
$handle->joinDeferred->fail(new ProcessException("The process was killed"));
|
||||||
|
Loading…
Reference in New Issue
Block a user