Closed ghost closed 7 years ago
I'm not super excited about this, you should use setpgid
instead in your host process
The issue that prompted this PR is that I don't control the host process. It's a debugging extension for my IDE.
setpgid
is also not portable between all operating systems. Node has no native call for this and the NPM packages that add it are for POSIX-compliant systems only.
Hm, what IDE is this? Can you show me their debugging extension code?
Visual Studio Code, specifically: https://github.com/Microsoft/vscode-chrome-debug
The code that is causing me grief is this spawn
call: https://github.com/Microsoft/vscode-chrome-debug/blob/master/src/chromeDebugAdapter.ts#L211
Fixes Electron not exiting when the CLI is spawned as a child process itself and then the parent process is killed via a signal.
Originally, running the following command and then sending a
SIGINT
to the Node process will cause Electron to remain open even through Node itself dies.