Use child_process.spawn instead of execFile

- Fixes #13084
- Kill child process on process exit, if it is running
- Ensure env is set correctly when new windows are launched
This commit is contained in:
Joe Fitzgerald
2016-11-13 07:32:32 -07:00
parent cbe8300f2a
commit 1b2d2f0299
2 changed files with 28 additions and 4 deletions

View File

@@ -509,7 +509,7 @@ class AtomApplication
openPaths: ({initialPaths, pathsToOpen, executedFrom, pidToKillWhenClosed, newWindow, devMode, safeMode, windowDimensions, profileStartup, window, clearWindowState, addToLastWindow, env}={}) ->
if not pathsToOpen? or pathsToOpen.length is 0
return
env = process.env unless env?
devMode = Boolean(devMode)
safeMode = Boolean(safeMode)
clearWindowState = Boolean(clearWindowState)