1
0
mirror of https://github.com/danog/process.git synced 2024-12-11 16:49:40 +01:00

Fix exit code watcher on Windows

This commit is contained in:
Niklas Keller 2017-09-17 20:57:44 +02:00
parent 4916378931
commit f57648e278

View File

@ -127,8 +127,10 @@ final class Runner implements ProcessRunner {
throw new ProcessException("Terminating process failed");
}
Loop::cancel($handle->exitCodeWatcher);
$handle->exitCodeWatcher = null;
if ($this->exitCodeWatcher !== null) {
Loop::cancel($handle->exitCodeWatcher);
$handle->exitCodeWatcher = null;
}
$handle->status = ProcessStatus::ENDED;
$handle->joinDeferred->fail(new ProcessException("The process was killed"));