Skip to content

Commit

Permalink
Handle SIGBREAK for Windows (#1909)
Browse files Browse the repository at this point in the history
  • Loading branch information
yanyongyu authored Apr 15, 2023
1 parent b934b3d commit 411dd87
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions uvicorn/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
signal.SIGINT, # Unix signal 2. Sent by Ctrl+C.
signal.SIGTERM, # Unix signal 15. Sent by `kill <pid>`.
)
if sys.platform == "win32": # pragma: py-not-win32
HANDLED_SIGNALS += (signal.SIGBREAK,) # Windows signal 21. Sent by Ctrl+Break.

logger = logging.getLogger("uvicorn.error")

Expand Down

0 comments on commit 411dd87

Please sign in to comment.