-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workaround for pyinstaller bootloader not propagating signals to …
…child. Usually, pyinstaller tries to pass signals (eg: SIGINT, SIGTERM) to the child so that it can properly respond. When running in `--onefile` mode (ie: bundled as single exe file), this doesn't happen. It appears that the bootloader spawns the child as a separate process that runs completely separately. Kill signals sent to the parent do not get forwarded to the child, which keeps running long after the parent ends. To work around this, I've added a check to see if a parent process exists with the same name and exe. The app will regularly check if the parent is still running. If not, the app exits. I also did some tidying up of the shutdown logic. I kept running into "memory at 0xFFFFF... cannot be referenced" errors popping up on Windows shutdown. I suspect these were due to exiting the wx mainloop without cleaning up resources (ie: destroying the app). I've made it so that `shutdown` is called after the event loop exits and it destroys the wxapp as part of the process
- Loading branch information
Showing
4 changed files
with
61 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ wmi | |
pypiwin32 | ||
wxPython | ||
pyvda | ||
psutil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters