summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kvmd/aioproc.py3
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