Skip to content

Commit

Permalink
Revert "ota_core: not install SIGTERM handler for now"
Browse files Browse the repository at this point in the history
This reverts commit 6934021.
  • Loading branch information
Bodong-Yang committed Nov 27, 2024
1 parent 732b5e1 commit 7f1c7e5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/otaclient/ota_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -869,6 +869,11 @@ def main(
)


def _sign_handler(signal_value, frame) -> NoReturn:
print(f"ota_core process receives {signal_value=}, exits ...")
sys.exit(1)


def ota_core_process(
shm_writer_factory: Callable[[], SharedOTAClientStatusWriter],
control_flag: mp_sync.Event,
Expand All @@ -879,6 +884,7 @@ def ota_core_process(
from otaclient.configs.cfg import proxy_info
from otaclient.ota_core import OTAClient

signal.signal(signal.SIGTERM, _sign_handler)
configure_logging()

shm_writer = shm_writer_factory()
Expand Down

0 comments on commit 7f1c7e5

Please sign in to comment.