From b91487c60ff1e832ee8828087db9d3050e951500 Mon Sep 17 00:00:00 2001 From: Corey Johnson & Kevin Sawicki Date: Wed, 29 May 2013 14:52:45 -0700 Subject: [PATCH] Pass pid to kill to AtomApplication ctor --- src/atom-application.coffee | 4 +--- src/main.coffee | 5 ++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/atom-application.coffee b/src/atom-application.coffee index 7abebf918..14908a249 100644 --- a/src/atom-application.coffee +++ b/src/atom-application.coffee @@ -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) => diff --git a/src/main.coffee b/src/main.coffee index 1ce98291c..e1fab163b 100644 --- a/src/main.coffee +++ b/src/main.coffee @@ -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}