mirror of
https://github.com/atom/atom.git
synced 2026-01-22 21:38:10 -05:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user