(processId: number)
| 169 | } |
| 170 | |
| 171 | function isProcessAlive(processId: number) { |
| 172 | try { |
| 173 | // kill with signal=0 just test for whether the proc is alive. It throws if not. |
| 174 | process.kill(processId, 0); |
| 175 | return true; |
| 176 | } catch { |
| 177 | return false; |
| 178 | } |
| 179 | } |