start-stop-daemon

How to process SIGTERM signal gracefully?

How to process SIGTERM signal gracefully? Question: 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 …

Total answers: 9