diff options
author | Maxim Devaev <[email protected]> | 2021-09-24 04:47:11 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2021-09-24 04:47:11 +0300 |
commit | 487476afe48029e81e5acc14e01c162df0386050 (patch) | |
tree | 82afa90e5bc2b2f3022ba30a34a2b76f675426df /kvmd/aioproc.py | |
parent | ab92a2d7084dea554edb9d5d0032327b302ef9f3 (diff) |
aioproc: use killpg() for SIGKILL
Diffstat (limited to 'kvmd/aioproc.py')
-rw-r--r-- | kvmd/aioproc.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kvmd/aioproc.py b/kvmd/aioproc.py index 5b5084e0..37b44e5c 100644 --- a/kvmd/aioproc.py +++ b/kvmd/aioproc.py @@ -21,6 +21,7 @@ import os +import signal import asyncio import asyncio.subprocess import logging @@ -96,7 +97,7 @@ async def kill_process(proc: asyncio.subprocess.Process, wait: float, logger: lo await asyncio.sleep(wait) if proc.returncode is None: try: - proc.kill() + os.killpg(os.getpgid(proc.pid), signal.SIGKILL) except Exception: if proc.returncode is not None: raise |