diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2019-06-06 11:07:12 +0200 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2019-06-06 18:27:06 +0200 |
commit | 9a9ea1434ab4d204d73503a61d5c1a044ce07366 (patch) | |
tree | 170e3d190ebb0da057c8f500f1fbfdfa0493b234 /mesonbuild/cmake | |
parent | b1bef5ae0df94ec892e0dc1bf126fe68f2d31d5c (diff) | |
download | meson-9a9ea1434ab4d204d73503a61d5c1a044ce07366.zip meson-9a9ea1434ab4d204d73503a61d5c1a044ce07366.tar.gz meson-9a9ea1434ab4d204d73503a61d5c1a044ce07366.tar.bz2 |
cmake: Fix cygwin failures
Diffstat (limited to 'mesonbuild/cmake')
-rw-r--r-- | mesonbuild/cmake/client.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/mesonbuild/cmake/client.py b/mesonbuild/cmake/client.py index 4581d6d..f4b549b 100644 --- a/mesonbuild/cmake/client.py +++ b/mesonbuild/cmake/client.py @@ -498,6 +498,15 @@ class CMakeClient: try: self.proc.wait(timeout=2) except TimeoutExpired: - self.proc.terminate() + # 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 |