We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ed78615 commit f869a4eCopy full SHA for f869a4e
src/aws_mcp_server/__main__.py
@@ -14,16 +14,17 @@
14
logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s", handlers=[logging.StreamHandler(sys.stderr)])
15
16
17
-def handle_interrupt(sig, frame):
+def handle_interrupt(signum, frame):
18
"""Handle keyboard interrupt (Ctrl+C) gracefully."""
19
- logger.info("Received interrupt signal. Shutting down gracefully...")
+ logger.info(f"Received signal {signum}, shutting down gracefully...")
20
sys.exit(0)
21
22
23
# Using FastMCP's built-in CLI handling
24
if __name__ == "__main__":
25
# Set up signal handler for graceful shutdown
26
signal.signal(signal.SIGINT, handle_interrupt)
27
+ signal.signal(signal.SIGTERM, handle_interrupt)
28
29
try:
30
# Use configured transport protocol
0 commit comments