Pass pid to kill to AtomApplication ctor

This commit is contained in:
Corey Johnson & Kevin Sawicki
2013-05-29 14:52:45 -07:00
parent 8ad695e89f
commit b91487c60f
2 changed files with 3 additions and 6 deletions

View File

@@ -19,11 +19,9 @@ class AtomApplication
version: null
socketPath: '/tmp/atom.sock'
constructor: ({@resourcePath, @pathsToOpen, @testMode, @version, wait, pid}) ->
constructor: ({@resourcePath, @pathsToOpen, @testMode, @version, pidToKillWhenClosed}) ->
@pidsToOpenWindows = {}
@pathsToOpen ?= [null]
pidToKillWhenClosed = pid if wait
@windows = []
@sendArgumentsToExistingProcess pidToKillWhenClosed, (success) =>

View File

@@ -40,8 +40,7 @@ parseCommandLine = ->
pathsToOpen = pathsToOpen.map (pathToOpen) ->
path.resolve(executedFrom ? process.cwd(), pathToOpen)
testMode = true if args['test']
wait = true if args['wait']
pid = args['pid']
pidToKillWhenClosed = args['pid'] if args['wait']
if args['resource-path']
resourcePath = args['resource-path']
@@ -53,4 +52,4 @@ parseCommandLine = ->
catch e
resourcePath = path.dirname(__dirname)
{resourcePath, executedFrom, pathsToOpen, testMode, version, wait, pid}
{resourcePath, executedFrom, pathsToOpen, testMode, version, pidToKillWhenClosed}