       if @testMode
         @runSpecs(true)
       else
-        @open(@pathsToOpen)
+        @openPaths(@pathsToOpen, pidToKillWhenClosed)
 
   removeWindow: (window) ->
     @windows.splice @windows.indexOf(window), 1


    null

  open: (pathsToOpen) ->
    if pathsToOpen?
      for pathToOpen in pathsToOpen
        pathToOpen = path.resolve(@executedFrom, pathToOpen) if @executedFrom and pathToOpen
        if existingWindow = @windowForPath(pathToOpen)
          existingWindow.focus()
          existingWindow.sendCommand('window:open-path', pathToOpen)
        else
          atomWindow = new AtomWindow
            pathToOpen: pathToOpen
            bootstrapScript: 'window-bootstrap'
            resourcePath: @resourcePath
    else
      atomWindow = new AtomWindow
        bootstrapScript: 'window-bootstrap'
        resourcePath: @resourcePath

  openConfig: ->
    if @configWindow


    process.env['NODE_PATH'] = resourcePaths.join path.delimiter

  sendArgumentsToExistingProcess: (pidToKillWhenClosed, callback) ->
    client = net.connect {path: @socketPath}, (args...) =>
      client.write(JSON.stringify({@pathsToOpen, pidToKillWhenClosed}))
      callback(true)

    client.on 'error', (args...) -> callback(false)
