Make process.exit() quit gracefully
Instead of abrupting the whole program immediately, we should close all windows and release all native resources gracefully on exit. This avoids possible crashes. Fix #3350.
This commit is contained in:
parent
c10c74b23a
commit
863199348f
8 changed files with 59 additions and 1 deletions
|
@ -50,7 +50,6 @@ app.getAppPath = ->
|
|||
# Be compatible with old API.
|
||||
app.once 'ready', -> @emit 'finish-launching'
|
||||
app.terminate = app.quit
|
||||
app.exit = process.exit
|
||||
app.getHomeDir = -> @getPath 'home'
|
||||
app.getDataPath = -> @getPath 'userData'
|
||||
app.setDataPath = (path) -> @setPath 'userData', path
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue