diff --git a/openpilot/system/manager/process.py b/openpilot/system/manager/process.py index 418e16fa8..43ea3f730 100644 --- a/openpilot/system/manager/process.py +++ b/openpilot/system/manager/process.py @@ -68,16 +68,11 @@ class ManagerProcess(ABC): enabled = True name = "" shutting_down = False - restart_if_crash = False @abstractmethod def start(self) -> None: pass - def restart(self) -> None: - self.stop(sig=signal.SIGKILL) - self.start() - def stop(self, retry: bool = True, block: bool = True, sig: signal.Signals | None = None) -> int | None: if self.proc is None: return None @@ -162,14 +157,13 @@ class NativeProcess(ManagerProcess): class PythonProcess(ManagerProcess): - def __init__(self, name, module, should_run, enabled=True, sigkill=False, restart_if_crash=False): + def __init__(self, name, module, should_run, enabled=True, sigkill=False): self.name = name self.module = module self.should_run = should_run self.enabled = enabled self.sigkill = sigkill self.launcher = launcher - self.restart_if_crash = restart_if_crash def start(self) -> None: # In case we only tried a non blocking stop we need to stop it before restarting @@ -236,9 +230,6 @@ def ensure_running(procs: ValuesView[ManagerProcess], started: bool, params: Par running = [] for p in procs: if p.enabled and p.name not in not_run and p.should_run(started, params, CP): - if p.restart_if_crash and p.proc is not None and not p.proc.is_alive(): - cloudlog.error(f'Restarting {p.name} (exitcode {p.proc.exitcode})') - p.restart() running.append(p) else: p.stop(block=False) diff --git a/openpilot/system/manager/process_config.py b/openpilot/system/manager/process_config.py index e60598a7b..1e9e236c9 100644 --- a/openpilot/system/manager/process_config.py +++ b/openpilot/system/manager/process_config.py @@ -89,7 +89,7 @@ procs = [ PythonProcess("dmonitoringmodeld", "openpilot.selfdrive.modeld.dmonitoringmodeld", driverview, enabled=(WEBCAM or not PC)), PythonProcess("sensord", "openpilot.system.sensord.sensord", only_onroad, enabled=not PC), - PythonProcess("ui", "openpilot.selfdrive.ui.ui", always_run, restart_if_crash=True), + PythonProcess("ui", "openpilot.selfdrive.ui.ui", always_run), PythonProcess("soundd", "openpilot.selfdrive.ui.soundd", driverview), PythonProcess("locationd", "openpilot.selfdrive.locationd.locationd", only_onroad), NativeProcess("_pandad", "openpilot/selfdrive/pandad", ["./pandad"], always_run, enabled=False),