how to handle os.system sigkill signal inside python?
Question: I have a python script where I call a lengthy process from the operating
system after a long while the process that I call get terminated by the system
by SIGKILL signal ,

is it possible to handle this from inside python like try and catch situation
??

what method should I use to solve this issue it is very important that this
process keep on running as long as possible without any interruptions


Answer: [There is no way to handle `SIGKILL`](http://man7.org/linux/man-
pages/man7/signal.7.html)

> The signals SIGKILL and SIGSTOP cannot be caught, blocked, or ignored.

If you're looking to handle system shutdown gracefully, you should be handling
`SIGTERM` or a startup/shutdown script such as an [upstart
job](http://upstart.ubuntu.com/getting-started.html) or a [init.d
script](http://www.tldp.org/HOWTO/HighQuality-Apps-HOWTO/boot.html).

