diff --git a/openviking/utils/process_lock.py b/openviking/utils/process_lock.py index 5b233ce3..5cc3934d 100644 --- a/openviking/utils/process_lock.py +++ b/openviking/utils/process_lock.py @@ -43,10 +43,13 @@ def _is_pid_alive(pid: int) -> bool: # Process exists but we can't signal it. return True except OSError: - # On Windows, os.kill(pid, 0) raises OSError (WinError 87 "The - # parameter is incorrect") for stale or invalid PIDs instead of - # ProcessLookupError. Treat this as "not alive" so stale lock - # files are correctly reclaimed. + # On Windows, os.kill(pid, 0) raises OSError for stale or invalid + # PIDs instead of ProcessLookupError. Common errors include: + # - WinError 87 "The parameter is incorrect" + # - WinError 11 "An attempt was made to load a program with an + # incorrect format" + # Treat any OSError as "not alive" so stale lock files are + # correctly reclaimed on Windows. return False