mirror of
https://github.com/electron/electron.git
synced 2026-01-29 09:18:18 -05:00
12 lines
201 B
JavaScript
12 lines
201 B
JavaScript
const {app} = require('electron')
|
|
|
|
console.log('started') // ping parent
|
|
|
|
const shouldExit = app.makeSingleInstance(() => {
|
|
process.nextTick(() => app.exit(0))
|
|
})
|
|
|
|
if (shouldExit) {
|
|
app.exit(1)
|
|
}
|