main.js 280 B

123456789101112
  1. const { app } = require('electron');
  2. app.whenReady().then(function () {
  3. // This setImmediate call gets the spec passing on Linux
  4. setImmediate(function () {
  5. app.exit(123);
  6. });
  7. });
  8. process.on('exit', function (code) {
  9. console.log('Exit event with code: ' + code);
  10. });