Kasper

Results 261 comments of Kasper

That does work. Personally I would prefer waiting for the child process to exit though instead of force quitting

Here's a working solution without force quitting: ```ts startup.exit = async () => { if (process.electronApp) { process.electronApp.removeAllListeners(); process.kill(process.electronApp.pid, 'SIGTERM'); await new Promise((resolve) => { process.electronApp.once("exit", resolve); }) } };...

Yes, it works for me. But I don't know how you want to incorporate `treeKillSync`

That does not work unfortunately. It doesn't quit, and gives me this error: ``` [47765:0919/044144.460406:ERROR:gpu_process_host.cc(993)] GPU process exited unexpectedly: exit_code=15 [47765:0919/044144.468629:ERROR:network_service_instance_impl.cc(601)] Network service crashed, restarting service. ```

I am on macOS, yes. Are you testing with a `before-quit` handler like I use though? https://github.com/probablykasper/ferrum/blob/7ac23dd2ca8fa397e51355aab6e0283f2e11be5a/src/electron/main.ts#L151-L168

> If we use process.kill(pid) instead of treeKillSync(pid), this will cause some Windows users to be unable to quit the previous App process instance. Do Wondows users have that issue...

It does not work unfortunately. I made a reproduction repo here: https://github.com/probablykasper/vite-plugin-electron-bug

Oh awesome! Thank you for letting me know

It's undefined initially, but when emptying the input, it becomes `null`. Updated the REPL to make that clearer