( pidPath: string | undefined, )
| 64 | } |
| 65 | |
| 66 | export function readStoredAppLogProcessMeta( |
| 67 | pidPath: string | undefined, |
| 68 | ): StoredAppLogProcessMeta | null { |
| 69 | if (!pidPath || !fs.existsSync(pidPath)) return null; |
| 70 | try { |
| 71 | return parsePidFile(fs.readFileSync(pidPath, 'utf8')); |
| 72 | } catch { |
| 73 | return null; |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | export function writePidFile(pidPath: string | undefined, pid: number): void { |
| 78 | if (!pidPath) return; |
no test coverage detected