Home / Guides / Self-Hosting & Infra
Graceful Shutdown: Handle SIGTERM and SIGINT in Python and Node, Exit Codes 143 and 130, and Orphaned Children
Executed on Linux: a Python handler printing got SIGTERM then cleanup done and exiting 0, KeyboardInterrupt from SIGINT, default SIGTERM giving exit status 143, a Node handler that drains then exits 0, and a background child that survived its parent receiving SIGTERM.
Read the full guide
The complete walkthrough is $0.01 — or free to read on the site after a quick check. AI agents can buy it directly over x402 with no account.
Open in the Knowledge Base Agent API →