(pid: number)
| 47 | import { jsonParse } from './slowOperations.js' |
| 48 | |
| 49 | function isProcessRunning(pid: number): boolean { |
| 50 | try { |
| 51 | process.kill(pid, 0) |
| 52 | return true |
| 53 | } catch { |
| 54 | return false |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | // Returns a function that lazily fetches our process's ancestor PID chain, |
| 59 | // caching within the closure's lifetime. Callers should scope this to a |
no test coverage detected