(root: string)
| 154 | } |
| 155 | |
| 156 | function 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 | |
| 164 | function readDaemonLog(root: string): string { |
| 165 | try { return fs.readFileSync(path.join(root, '.codegraph', 'daemon.log'), 'utf8'); } |
no test coverage detected