Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.
Python agent-contextagent-memoryagent-pluginsagentic-ragcontext-databasedsh-pluginknowledge-basememorymemory-managementself-evolvingvector-database
fix(utils): handle additional Windows OSError codes in process_lock (#854)
Andrew Barnes95636abdcf16
diff --git a/openviking/utils/process_lock.py b/openviking/utils/process_lock.pyindex 5cc3934da..f60452ae6 100644--- a/openviking/utils/process_lock.py+++ b/openviking/utils/process_lock.py@@ -9,6 +9,7 @@ directory, which causes silent failures in AGFS and VectorDB.import atexitimport osimport signal+import sysfrom openviking_cli.utils import get_logger@@ -43,14 +44,16 @@ def _is_pid_alive(pid: int) -> bool:# Process exists but we can't signal it.return Trueexcept OSError:- # 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+ if sys.platform == "win32":+ # 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+ raisedef acquire_data_dir_lock(data_dir: str) -> str: