MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / readLockPid

Function readLockPid

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

Source from the content-addressed store, hash-verified

154}
155
156function readLockPid(root: string): number | null {
157 try {
158 const raw = fs.readFileSync(path.join(root, '.codegraph', 'daemon.pid'), 'utf8');
159 const info = JSON.parse(raw);
160 return typeof info.pid === 'number' ? info.pid : null;
161 } catch { return null; }
162}
163
164function readDaemonLog(root: string): string {
165 try { return fs.readFileSync(path.join(root, '.codegraph', 'daemon.log'), 'utf8'); }

Callers 1

mcp-daemon.test.tsFile · 0.70

Calls 2

parseMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected