OSX processes fail to shut down on close #79

Closed
opened 2026-01-29 16:30:05 +00:00 by claunia · 3 comments
Owner

Originally created by @yoDon on GitHub (Nov 26, 2017).

Originally assigned to: @robertmuehsig, @GregorBiswanger on GitHub.

In both dev and packaged builds, closing the macOS application window kills the Host process but leaves the inner application process running as a high-cpu-consuming zombie that needs to be manually killed via the Activity Monitor.

Originally created by @yoDon on GitHub (Nov 26, 2017). Originally assigned to: @robertmuehsig, @GregorBiswanger on GitHub. In both dev and packaged builds, closing the macOS application window kills the Host process but leaves the inner application process running as a high-cpu-consuming zombie that needs to be manually killed via the Activity Monitor.
claunia added the bug label 2026-01-29 16:30:05 +00:00
Author
Owner

@BrianAllred commented on GitHub (Nov 28, 2017):

This can happen if you use invisible windows (for background processes) and don't close them out or an error occurs before they close. I was experiencing the same thing on Windows until I added a try-catch-finally where the finally called the close all windows method.

Might try that and see if it helps.

@BrianAllred commented on GitHub (Nov 28, 2017): This can happen if you use invisible windows (for background processes) and don't close them out or an error occurs before they close. I was experiencing the same thing on Windows until I added a try-catch-finally where the finally called the close all windows method. Might try that and see if it helps.
Author
Owner

@GregorBiswanger commented on GitHub (Feb 25, 2018):

@yoDon do you try out the newest version of API and CLI (0.0.9)?

@GregorBiswanger commented on GitHub (Feb 25, 2018): @yoDon do you try out the newest version of API and CLI (0.0.9)?
Author
Owner

@netpoetica commented on GitHub (Jun 3, 2019):

Two things: 1) I am still seeing this issue on Mac OSX for sure. Electron window will close, but background process remains relentlessly. And 2) I do not see a CloseAllWindows method anywhere - is there one? I have confirmed in the WillQuit event that there is only 1 window in my application, yet when closed, background process remains.

Additionally, the .Quit() function says "It is possible that a window cancels the quitting by returning false in the beforeunload event handler." however, there is no BeforeUnload event handler on Electron.App. Is there supposed to be?

@netpoetica commented on GitHub (Jun 3, 2019): Two things: 1) I am still seeing this issue on Mac OSX for sure. Electron window will close, but background process remains relentlessly. And 2) I do not see a CloseAllWindows method anywhere - is there one? I have confirmed in the WillQuit event that there is only 1 window in my application, yet when closed, background process remains. Additionally, the .Quit() function says "It is possible that a window cancels the quitting by returning false in the beforeunload event handler." however, there is no BeforeUnload event handler on Electron.App. Is there supposed to be?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#79