diff options
Diffstat (limited to 'kvmd/aioproc.py')
-rw-r--r-- | kvmd/aioproc.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/kvmd/aioproc.py b/kvmd/aioproc.py index ecf6230e..b4b84ea4 100644 --- a/kvmd/aioproc.py +++ b/kvmd/aioproc.py @@ -20,9 +20,9 @@ # ========================================================================== # +import os import asyncio import asyncio.subprocess -import signal import logging from typing import Tuple @@ -37,7 +37,7 @@ async def run_process(cmd: List[str], err_to_null: bool=False) -> asyncio.subpro *cmd, stdout=asyncio.subprocess.PIPE, stderr=(asyncio.subprocess.DEVNULL if err_to_null else asyncio.subprocess.STDOUT), - preexec_fn=ignore_sigint, + preexec_fn=os.setpgrp, )) @@ -69,9 +69,5 @@ async def log_stdout_infinite(proc: asyncio.subprocess.Process, logger: logging. raise RuntimeError("asyncio process: too many empty lines") -def ignore_sigint() -> None: - signal.signal(signal.SIGINT, signal.SIG_IGN) - - def rename_process(suffix: str, prefix: str="kvmd") -> None: setproctitle.setproctitle(f"{prefix}/{suffix}: {setproctitle.getproctitle()}") |