(pid: number, hostname: string)
| 116 | } |
| 117 | |
| 118 | function defaultIsProcessAlive(pid: number, hostname: string): boolean { |
| 119 | if (hostname !== osHostname()) return true |
| 120 | try { |
| 121 | process.kill(pid, 0) |
| 122 | return true |
| 123 | } catch { |
| 124 | return false |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | function isErrno(err: unknown, code: string): boolean { |
| 129 | return err instanceof Error && 'code' in err && (err as NodeJS.ErrnoException).code === code |
nothing calls this directly
no outgoing calls
no test coverage detected