MCPcopy Create free account
hub / github.com/callstack/agent-device / readLockInfo

Function readLockInfo

src/daemon/server/server-lifecycle.ts:60–69  ·  view source on GitHub ↗
(lockPath: string)

Source from the content-addressed store, hash-verified

58}
59
60function readLockInfo(lockPath: string): DaemonLockInfo | null {
61 if (!fs.existsSync(lockPath)) return null;
62 try {
63 const parsed = JSON.parse(fs.readFileSync(lockPath, 'utf8')) as DaemonLockInfo;
64 if (!Number.isInteger(parsed.pid) || parsed.pid <= 0) return null;
65 return parsed;
66 } catch {
67 return null;
68 }
69}
70
71export function acquireDaemonLock(
72 baseDir: string,

Callers 2

acquireDaemonLockFunction · 0.85
releaseDaemonLockFunction · 0.85

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…