Skip to content
Discussion options

You must be logged in to vote

On Windows, both SIGINT and SIGTERM result in process termination via TerminateProcess; there is no way to gracefully interrupt the process.

So if you have no option to programmatically stop your uvicorn server (which seems to be the reason for this signal-based approach), you are out of luck, since the alternative (the console control events) require a console. This has nothing to with PyInstaller, though; you would run into same issues if you ran your code in windowed/noconsole python interpreter (pythonw).

Replies: 1 comment 11 replies

Comment options

You must be logged in to vote
11 replies
@rokm
Comment options

rokm Dec 10, 2025
Maintainer

@danrossi
Comment options

@danrossi
Comment options

@rokm
Comment options

rokm Dec 10, 2025
Maintainer

Answer selected by danrossi
@danrossi
Comment options

@danrossi
Comment options

@rokm
Comment options

rokm Dec 10, 2025
Maintainer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants