fix: add file-lock fallback for single-instance guard

Co-authored-by: Haze <hazeone@users.noreply.github.com>
This commit is contained in:
Cursor Agent
2026-03-18 12:27:28 +00:00
committed by Haze
parent 745b67536b
commit b302e5553f
6 changed files with 215 additions and 2 deletions

View File

@@ -258,6 +258,7 @@ ClawX employs a **dual-process architecture** with a unified host API layer. The
### Process Model & Gateway Troubleshooting
- ClawX is an Electron app, so **one app instance normally appears as multiple OS processes** (main/renderer/zygote/utility). This is expected.
- Single-instance protection uses Electron's lock plus a local process-file lock fallback, preventing duplicate app launch in environments where desktop IPC/session bus is unstable.
- The OpenClaw Gateway listener should still be **single-owner**: only one process should listen on `127.0.0.1:18789`.
- To verify the active listener:
- macOS/Linux: `lsof -nP -iTCP:18789 -sTCP:LISTEN`