title: Exit gracefully from Python after SIGKILL
body: <p>The problem being that SIGKILL cannot be caught, is there a way to ensure that a block of code gets executed on program termination? I have a process that starts five subprocesses and changes the state of platform hardware - it handles SIGTERM and SIGINT, however a SIGKILL will kill the main process while the subprocesses continue to run. Is there a way to always execute a cleanup or do I have to accept that SIGKILL will leave the computer in a 'corrupt' state?</p>