mirror of
https://github.com/atom/atom.git
synced 2026-02-05 20:25:04 -05:00
Pass pid to kill to AtomApplication ctor
This commit is contained in:
@@ -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) =>
|
||||
|
||||
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user