MCPcopy Create free account
hub / github.com/clawbot7/cli-gateway / readLockFile

Function readLockFile

src/runtime/lock.ts:100–108  ·  view source on GitHub ↗
(lockPath: string)

Source from the content-addressed store, hash-verified

98}
99
100function readLockFile(lockPath: string): { pid?: number } | null {
101 try {
102 const raw = fs.readFileSync(lockPath, 'utf8');
103 const parsed = JSON.parse(raw) as any;
104 return parsed && typeof parsed === 'object' ? parsed : null;
105 } catch {
106 return null;
107 }
108}

Callers 1

acquireProcessLockFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected