(child: ChildProcess)
| 16 | } |
| 17 | |
| 18 | function terminateChildProcess(child: ChildProcess): void { |
| 19 | // Windows does not support POSIX signals like SIGTERM reliably. |
| 20 | // Calling kill() without a signal uses the platform default behavior. |
| 21 | try { |
| 22 | if (process.platform === 'win32') { |
| 23 | child.kill(); |
| 24 | } else { |
| 25 | child.kill('SIGTERM'); |
| 26 | } |
| 27 | } catch { |
| 28 | // ignore |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | function normalizeExecutable(executable: string): string { |
| 33 | if (process.platform !== 'win32') { |