On a Linux system, the signal -KILLTERM sends a signal that allows applications to safely shut down. These questions might be a little theoretical, but I want to understand them.
When a system sends a terminate signal, where is it sent?
What allows time for the process or, application, to 'safely' terminate?
Is there a child process, or something similar, that runs in the background of an application that looks for this signal?
These questions stem from the Linux watchdog, in reading the man page I saw that the process of the watchdog is to first send a terminate signal to a given PID, and then a KILL -9 signal to force it. I want to be able to utilize the safety built in to the watchdog.