* Check if a process with the given PID is alive.
(pid: number)
| 66 | * Check if a process with the given PID is alive. |
| 67 | */ |
| 68 | function isProcessAlive(pid: number): boolean { |
| 69 | try { |
| 70 | process.kill(pid, 0) |
| 71 | return true |
| 72 | } catch { |
| 73 | return false |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | /** |
| 78 | * Query the daemon status by reading the state file and probing the PID. |
no test coverage detected