stop signals propagation in 3.9

This commit is contained in:
Devaev Maxim
2020-12-02 15:07:08 +03:00
parent 2b064a3bee
commit 5bc868662a
6 changed files with 8 additions and 13 deletions

View File

@@ -273,7 +273,7 @@ class BaseMcuHid(BaseHid, multiprocessing.Process): # pylint: disable=too-many-
logger = get_logger(0)
logger.info("Started HID pid=%d", os.getpid())
aioproc.ignore_sigint()
os.setpgrp()
aioproc.rename_process("hid")
while not self.__stop_event.is_set():

View File

@@ -197,7 +197,7 @@ class Plugin(BaseHid): # pylint: disable=too-many-instance-attributes
logger = get_logger(0)
logger.info("Started HID pid=%d", os.getpid())
aioproc.ignore_sigint()
os.setpgrp()
aioproc.rename_process("hid")
while not self.__stop_event.is_set():

View File

@@ -81,7 +81,7 @@ class BaseDeviceProcess(multiprocessing.Process): # pylint: disable=too-many-in
logger = get_logger(0)
logger.info("Started HID-%s pid=%d", self.__name, os.getpid())
aioproc.ignore_sigint()
os.setpgrp()
aioproc.rename_process(f"hid-{self.__name}")
while not self.__stop_event.is_set():