cmake: Fix cygwin failures

pull/4969/head
Daniel Mensinger 6 years ago
parent b1bef5ae0d
commit 9a9ea1434a
No known key found for this signature in database
GPG Key ID: 54DD94C131E277D4
  1. 9
      mesonbuild/cmake/client.py

@ -498,6 +498,15 @@ class CMakeClient:
try:
self.proc.wait(timeout=2)
except TimeoutExpired:
# Terminate CMake if there is a timeout
# terminate() may throw a platform specific exception if the process has already
# terminated. This may be the case if there is a race condition (CMake exited after
# the timeout but before the terminate() call). Additionally, this behavior can
# also be triggered on cygwin if CMake crashes.
# See https://github.com/mesonbuild/meson/pull/4969#issuecomment-499413233
try:
self.proc.terminate()
except Exception:
pass
self.proc = None

Loading…
Cancel
Save