mirror of
https://github.com/atom/atom.git
synced 2026-01-22 21:38:10 -05:00
Catch and log errors thrown by process.kill()
These can occur if killing the process fails because it no longer exists.
This commit is contained in:
@@ -249,7 +249,11 @@ class AtomApplication
|
||||
|
||||
openedWindow.browserWindow.on 'closed', =>
|
||||
for pid, trackedWindow of @pidsToOpenWindows when trackedWindow is openedWindow
|
||||
process.kill(pid)
|
||||
try
|
||||
process.kill(pid)
|
||||
catch error
|
||||
if error.code isnt 'ESRCH'
|
||||
console.log("Killing process #{pid} failed: #{error.code}")
|
||||
delete @pidsToOpenWindows[pid]
|
||||
|
||||
openConfig: ->
|
||||
|
||||
Reference in New Issue
Block a user