(root: string)
| 145 | } |
| 146 | |
| 147 | function readLockPid(root: string): number | null { |
| 148 | try { |
| 149 | const raw = fs.readFileSync(path.join(root, '.codegraph', 'daemon.pid'), 'utf8'); |
| 150 | const info = JSON.parse(raw); |
| 151 | return typeof info.pid === 'number' ? info.pid : null; |
| 152 | } catch { return null; } |
| 153 | } |
| 154 | |
| 155 | function readDaemonLog(root: string): string { |
| 156 | try { return fs.readFileSync(path.join(root, '.codegraph', 'daemon.log'), 'utf8'); } |