How to process SIGTERM signal gracefully?
Let’s assume we have such a trivial daemon written in python: def mainloop(): while True: # 1. do # 2. some # 3. important # 4. job # 5. sleep mainloop() and we daemonize it using start-stop-daemon which by default sends SIGTERM (TERM) signal on –stop. Let’s suppose the current step performed is #2. And … Read more