llama-stack-mirror/llama_stack/distribution/server
Sébastien Han 019ddda138
fix: graceful SIGINT on server (#2831)
# What does this PR do?

After https://github.com/meta-llama/llama-stack/pull/2818, SIGINT will
print a stack trace. This is because uvicorn re-raises SIGINT and it
gets converted by Python internal signal handler (default handles
SIGINT) to KeyboardInterrupt exception. We know simply catch the
exception to get a clean exit, this is not changing the behavior on
SIGINT.

## Test Plan

Run the server, hit Ctrl+C or `kill -2 <server pid>` and expect a clean
exit with no stack trace.

Signed-off-by: Sébastien Han <seb@redhat.com>
2025-07-21 11:35:15 -07:00
..
__init__.py API Updates (#73) 2024-09-17 19:51:35 -07:00
auth.py feat(auth): support github tokens (#2509) 2025-07-08 11:02:36 -07:00
auth_providers.py feat(auth): support github tokens (#2509) 2025-07-08 11:02:36 -07:00
quota.py feat: drop python 3.10 support (#2469) 2025-06-19 12:07:14 +05:30
routes.py chore: use starlette built-in Route class (#2267) 2025-05-28 09:53:33 -07:00
server.py fix: graceful SIGINT on server (#2831) 2025-07-21 11:35:15 -07:00