Emit process exit event with app exit code
This commit is contained in:
parent
d2e63dfc64
commit
63c0095efb
3 changed files with 13 additions and 7 deletions
|
@ -51,13 +51,7 @@ process.on 'uncaughtException', (error) ->
|
|||
message = "Uncaught Exception:\n#{stack}"
|
||||
dialog.showErrorBox 'A JavaScript error occurred in the main process', message
|
||||
|
||||
# Emit 'exit' event on quit.
|
||||
{app} = require 'electron'
|
||||
app.on 'quit', ->
|
||||
process.emit 'exit'
|
||||
|
||||
# Map process.exit to app.exit, which quits gracefully.
|
||||
process.exit = app.exit
|
||||
|
||||
# Load the RPC server.
|
||||
require './rpc-server'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue