(pid: number)
| 22 | |
| 23 | /** Is a pid alive? (kill 0 probes without signalling.) */ |
| 24 | export function isAlive(pid: number): boolean { |
| 25 | try { process.kill(pid, 0); return true; } catch (e: any) { return e?.code === 'EPERM'; } |
| 26 | } |
| 27 | |
| 28 | export interface BotStatus { running: boolean; pid?: number } |
| 29 |