(pid?: number)
| 411 | } |
| 412 | |
| 413 | public static kill(pid?: number): void { |
| 414 | try { |
| 415 | if (!pid) { |
| 416 | return; |
| 417 | } |
| 418 | if (process.platform === 'win32') { |
| 419 | // Windows doesn't support SIGTERM, so execute taskkill to kill the process |
| 420 | child_process.execSync(`taskkill /pid ${pid} /T /F`); |
| 421 | } else { |
| 422 | process.kill(pid); |
| 423 | } |
| 424 | } catch { |
| 425 | // Ignore. |
| 426 | } |
| 427 | } |
| 428 | } |
| 429 | |
| 430 | function generateHashedPassword(password: string) { |