(sessionId: string)
| 94 | } |
| 95 | |
| 96 | export function isDaemonRunning(sessionId: string): boolean { |
| 97 | const pid = getDaemonPid(sessionId); |
| 98 | if (pid) { |
| 99 | try { |
| 100 | process.kill(pid, 0); // Throws if process doesn't exist |
| 101 | return true; |
| 102 | } catch { |
| 103 | // Process is dead, stale PID file. Proceed with startup. |
| 104 | } |
| 105 | } |
| 106 | return false; |
| 107 | } |
| 108 | |
| 109 | export function serializeArgs( |
| 110 | options: Record<string, YargsOptions>, |
no test coverage detected