MCPcopy
hub / github.com/colbymchenry/codegraph / readLockPid

Function readLockPid

__tests__/mcp-daemon.test.ts:141–147  ·  view source on GitHub ↗
(root: string)

Source from the content-addressed store, hash-verified

139}
140
141function readLockPid(root: string): number | null {
142 try {
143 const raw = fs.readFileSync(path.join(root, '.codegraph', 'daemon.pid'), 'utf8');
144 const info = JSON.parse(raw);
145 return typeof info.pid === 'number' ? info.pid : null;
146 } catch { return null; }
147}
148
149function readDaemonLog(root: string): string {
150 try { return fs.readFileSync(path.join(root, '.codegraph', 'daemon.log'), 'utf8'); }

Callers 1

mcp-daemon.test.tsFile · 0.85

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected