diff --git a/python/tests/helpers.py b/python/tests/helpers.py index 387da9ba49..48dd4bffc9 100644 --- a/python/tests/helpers.py +++ b/python/tests/helpers.py @@ -93,5 +93,6 @@ def _get_return_code(self): def __exit__(self, exc_type, exc_val, exc_tb): if self.p: + group_id = os.getpgid(self.p.pid) # Kill the entire process groups (including subprocesses of self.p) - os.killpg(os.getpgid(self.p.pid), signal.SIGTERM) + os.killpg(group_id, signal.SIGKILL)