summaryrefslogtreecommitdiff
path: root/kvmd/plugins/hid/otg
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2020-06-04 06:27:52 +0300
committerDevaev Maxim <[email protected]>2020-06-04 06:27:52 +0300
commit9cee98310deb851c4a5c36b1e593f032f8234c32 (patch)
tree907d908432c5ce43c729866d67a323daf35aa25e /kvmd/plugins/hid/otg
parentbe9ce4e4ffa418ba64612efdabee116dd59a6f5d (diff)
refactoring
Diffstat (limited to 'kvmd/plugins/hid/otg')
-rw-r--r--kvmd/plugins/hid/otg/device.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/kvmd/plugins/hid/otg/device.py b/kvmd/plugins/hid/otg/device.py
index d1a2c86c..44c286cb 100644
--- a/kvmd/plugins/hid/otg/device.py
+++ b/kvmd/plugins/hid/otg/device.py
@@ -22,7 +22,6 @@
import os
import select
-import signal
import multiprocessing
import multiprocessing.queues
import queue
@@ -31,11 +30,10 @@ import time
from typing import Dict
-import setproctitle
-
from ....logging import get_logger
from .... import aiomulti
+from .... import aioproc
# =====
@@ -78,8 +76,8 @@ class BaseDeviceProcess(multiprocessing.Process): # pylint: disable=too-many-in
logger = get_logger(0)
logger.info("Started HID-%s pid=%d", self.__name, os.getpid())
- signal.signal(signal.SIGINT, signal.SIG_IGN)
- setproctitle.setproctitle(f"kvmd/hid-{self.__name}: {setproctitle.getproctitle()}")
+ aioproc.ignore_sigint()
+ aioproc.rename_process(f"hid-{self.__name}")
while not self.__stop_event.is_set():
try: