diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2017-11-15 23:18:06 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-11-19 18:20:41 +0200 |
commit | 5cd8a7bbccac13cadb2515cfb433da8adde04b4d (patch) | |
tree | 4ffc12913116a7a7f4357191ec87e7fd90058b54 | |
parent | 638077181a79bb974494bce8355e49a11b22d242 (diff) | |
download | meson-5cd8a7bbccac13cadb2515cfb433da8adde04b4d.zip meson-5cd8a7bbccac13cadb2515cfb433da8adde04b4d.tar.gz meson-5cd8a7bbccac13cadb2515cfb433da8adde04b4d.tar.bz2 |
More defensive process killing. Closes #2629.
-rw-r--r-- | mesonbuild/mtest.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py index 267e130..30322aa 100644 --- a/mesonbuild/mtest.py +++ b/mesonbuild/mtest.py @@ -267,7 +267,13 @@ class TestHarness: if is_windows(): subprocess.call(['taskkill', '/F', '/T', '/PID', str(p.pid)]) else: - os.killpg(os.getpgid(p.pid), signal.SIGKILL) + try: + os.killpg(os.getpgid(p.pid), signal.SIGKILL) + except ProcessLookupError: + # Sometimes (e.g. with Wine) this happens. + # There's nothing we can do (maybe the process + # already died) so carry on. + pass (stdo, stde) = p.communicate() endtime = time.time() duration = endtime - starttime |