Handle SIGINT with forkserver (#18860)

* Pass stopevent from main start

* Share stop event across processes

* preload modules

* remove explicit os._exit call

---------

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
This commit is contained in:
Nicolas Mowen
2025-08-16 10:20:33 -05:00
committed by Blake Blackshear
co-authored by Josh Hawkins
parent e1ee6f010f
commit 542bf05bb8
11 changed files with 68 additions and 46 deletions
+3 -2
View File
@@ -5,6 +5,7 @@ import logging
import os
import shutil
import threading
from multiprocessing.synchronize import Event as MpEvent
from wsgiref.simple_server import make_server
from ws4py.server.wsgirefserver import (
@@ -72,8 +73,8 @@ def check_disabled_camera_update(
class OutputProcess(FrigateProcess):
def __init__(self, config: FrigateConfig) -> None:
super().__init__(name="frigate.output", daemon=True)
def __init__(self, config: FrigateConfig, stop_event: MpEvent) -> None:
super().__init__(stop_event, name="frigate.output", daemon=True)
self.config = config
def run(self) -> None: