Skip to content

app.quit() can't terminate electron.exe in 'ready' event handler without any window created #2312

@duanyao

Description

@duanyao

The minimal test case:

package.json :

{
  "main": "quit-test.js",
  "name": "quit-test",
  "description": "quit-test",
  "version": "0.1.0"
}

quit-test.js :

var app = require('app');
app.on('ready', function () {
    console.log('ev:app ready');
    app.quit();
    console.log('after app.quit()');
});

app.on('quit', function () {
    console.log('ev:app quit');
});

app.on('will-quit', function () {
    console.log('ev:app will-quit');
});

Console output:

[804:0723/203017:INFO:CONSOLE(0)] ev:app ready
[804:0723/203017:INFO:CONSOLE(0)] ev:app will-quit
[804:0723/203017:INFO:CONSOLE(0)] ev:app quit
[804:0723/203017:INFO:CONSOLE(0)] after app.quit()

After the "quit" event, there are still two electron.exe process listed in Windows task manager, and I have to kill them forcibly.

Tested with electron-v0.30.0-win32-ia32 on Windows 7 64bit.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions