Closed julien-h closed 3 years ago
Does the atexit
module not work on Windows?
Yes and no, it's somewhat limited in what it can do:
The functions registered via this module are not called when the program is killed by a signal not handled by Python, when a Python fatal internal error is detected, or when os._exit() is called.
I found two useful links:
It looks like the accepted answer to the second link provides a solution but I don't understand it.
Thanks for the links.
I think that this is somewhat out of scope for this library however, as it is not related to system tray icons at all, so I am afraid that I will close this issue.
Is there a way to execute cleanup code in the app before it is killed by Windows or quits? Including before logout, shutdown and restart.
On Windows operating system, console python applications receive some signals but apparently, not windowed ones.