()
| 179 | await child.exited; |
| 180 | }; |
| 181 | const stopOnParentSignal = (): void => { |
| 182 | // A PTY/session teardown can signal the CLI while Vite is still optimizing |
| 183 | // dependencies, before the server's normal stop handle exists. Reap the |
| 184 | // owned child immediately; the CLI's signal waiter performs full cleanup |
| 185 | // once startup has completed. |
| 186 | void stop(); |
| 187 | }; |
| 188 | for (const signal of viteChildSignals) process.once(signal, stopOnParentSignal); |
| 189 | |
| 190 | const url = `http://127.0.0.1:${vitePort}`; |