Currently, if you try to use childProcess.fork() from a script running in Electron, it will fork a new process with the ELECTRON_RUN_AS_NODE=1 environment variable hard-coded. This is a good default as otherwise it would break a lot of existing Node.js modules. However, there should be a way to override it. I need to be able to fork a Electron process from Electron without the ELECTRON_RUN_AS_NODE environment variable, so require('electron') is available.
Previous discussion: #4520
- Electron version: 1.3.1
- Operating system: macOS 10.11.6
Currently, if you try to use
childProcess.fork()from a script running in Electron, it will fork a new process with theELECTRON_RUN_AS_NODE=1environment variable hard-coded. This is a good default as otherwise it would break a lot of existing Node.js modules. However, there should be a way to override it. I need to be able to fork a Electron process from Electron without theELECTRON_RUN_AS_NODEenvironment variable, sorequire('electron')is available.Previous discussion: #4520