Skip to content

Commit 411dd87

Browse files
authored
Handle SIGBREAK for Windows (#1909)
1 parent b934b3d commit 411dd87

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

uvicorn/server.py

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
signal.SIGINT, # Unix signal 2. Sent by Ctrl+C.
2929
signal.SIGTERM, # Unix signal 15. Sent by `kill <pid>`.
3030
)
31+
if sys.platform == "win32": # pragma: py-not-win32
32+
HANDLED_SIGNALS += (signal.SIGBREAK,) # Windows signal 21. Sent by Ctrl+Break.
3133

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

0 commit comments

Comments
 (0)