Call process.kill with a number

This appears to have changed in node 0.11.14 to be stricter

Closes #3708
This commit is contained in:
Kevin Sawicki
2014-10-02 09:54:37 -07:00
parent 6ce5356505
commit 0de17d1b84

View File

@@ -376,10 +376,11 @@ class AtomApplication
# Kill the process with the given pid.
killProcess: (pid) ->
try
process.kill(pid)
parsedPid = parseInt(pid)
process.kill(parsedPid) unless isNaN(parsedPid)
catch error
if error.code isnt 'ESRCH'
console.log("Killing process #{pid} failed: #{error.code}")
console.log("Killing process #{pid} failed: #{error.code ? error.message}")
delete @pidsToOpenWindows[pid]
# Open an atom:// url.