{"action":"created","issue":{"url":"https://api.github.com/repos/atom/electron/issues/2312","labels_url":"https://api.github.com/repos/atom/electron/issues/2312/labels{/name}","comments_url":"https://api.github.com/repos/atom/electron/issues/2312/comments","events_url":"https://api.github.com/repos/atom/electron/issues/2312/events","html_url":"https://github.com/atom/electron/issues/2312","id":96805277,"number":2312,"title":"app.quit() can't terminate electron.exe in 'ready' event handler without any window created","user":{"login":"duanyao","id":1684137,"avatar_url":"https://avatars.githubusercontent.com/u/1684137?v=3","gravatar_id":"","url":"https://api.github.com/users/duanyao","html_url":"https://github.com/duanyao","followers_url":"https://api.github.com/users/duanyao/followers","following_url":"https://api.github.com/users/duanyao/following{/other_user}","gists_url":"https://api.github.com/users/duanyao/gists{/gist_id}","starred_url":"https://api.github.com/users/duanyao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duanyao/subscriptions","organizations_url":"https://api.github.com/users/duanyao/orgs","repos_url":"https://api.github.com/users/duanyao/repos","events_url":"https://api.github.com/users/duanyao/events{/privacy}","received_events_url":"https://api.github.com/users/duanyao/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/atom/electron/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/atom/electron/labels/windows","name":"windows","color":"c7def8"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-23T12:45:48Z","updated_at":"2015-10-29T17:28:20Z","closed_at":"2015-08-27T03:56:58Z","body":"The minimal test case:\r\n\r\n`package.json` :\r\n```javascript\r\n{\r\n  \"main\": \"quit-test.js\",\r\n  \"name\": \"quit-test\",\r\n  \"description\": \"quit-test\",\r\n  \"version\": \"0.1.0\"\r\n}\r\n```\r\n`quit-test.js` : \r\n```javascript\r\nvar app = require('app');\r\napp.on('ready', function () {\r\n\tconsole.log('ev:app ready');\r\n\tapp.quit();\r\n\tconsole.log('after app.quit()');\r\n});\r\n\r\napp.on('quit', function () {\r\n\tconsole.log('ev:app quit');\r\n});\r\n\r\napp.on('will-quit', function () {\r\n\tconsole.log('ev:app will-quit');\r\n});\r\n```\r\nConsole output:\r\n```\r\n[804:0723/203017:INFO:CONSOLE(0)] ev:app ready\r\n[804:0723/203017:INFO:CONSOLE(0)] ev:app will-quit\r\n[804:0723/203017:INFO:CONSOLE(0)] ev:app quit\r\n[804:0723/203017:INFO:CONSOLE(0)] after app.quit()\r\n```\r\nAfter the \"quit\" event, there are still two `electron.exe` process listed in Windows task manager, and I have to kill them forcibly.\r\n\r\nTested with electron-v0.30.0-win32-ia32 on Windows 7 64bit.\r\n"},"comment":{"url":"https://api.github.com/repos/atom/electron/issues/comments/152257430","html_url":"https://github.com/atom/electron/issues/2312#issuecomment-152257430","issue_url":"https://api.github.com/repos/atom/electron/issues/2312","id":152257430,"user":{"login":"adilanchian","id":13204620,"avatar_url":"https://avatars.githubusercontent.com/u/13204620?v=3","gravatar_id":"","url":"https://api.github.com/users/adilanchian","html_url":"https://github.com/adilanchian","followers_url":"https://api.github.com/users/adilanchian/followers","following_url":"https://api.github.com/users/adilanchian/following{/other_user}","gists_url":"https://api.github.com/users/adilanchian/gists{/gist_id}","starred_url":"https://api.github.com/users/adilanchian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adilanchian/subscriptions","organizations_url":"https://api.github.com/users/adilanchian/orgs","repos_url":"https://api.github.com/users/adilanchian/repos","events_url":"https://api.github.com/users/adilanchian/events{/privacy}","received_events_url":"https://api.github.com/users/adilanchian/received_events","type":"User","site_admin":false},"created_at":"2015-10-29T17:28:20Z","updated_at":"2015-10-29T17:28:20Z","body":"Was this fixed? I'm having the same issue on Windows 7 running Electron 0.32.2 as well as Electron 0.34.1. I've tried two different code examples: \r\n\r\n  ```app.on('will-quit', function()\r\n  {\r\n    if (process.platform != 'darwin')\r\n      app.quit();\r\n  });```\r\n\r\nas well as \r\n\r\n```app.on('windows-all-closed', function()\r\n{\r\n    if (process.platform != 'darwin')\r\n      app.quit();\r\n  });```\r\n\r\nI have two open processes, close the window and I'm stuck with one. Thanks for your time!\r\n\r\n-Alec"}}