signalssigabrtsigtermsigkillgraceful-shutdown

How many time does an application have to perform cleanup when a SIGABORT is received?


I've been testing a critical application against signals it might receive:


Solution

  • Whether a signal is ignorable has no bearing on if and when it is followed by SIGKILL.

    Systemd gives processes 90 seconds by default after sending SIGTERM before killing the processes with SIGKILL. This can be configured on a per service basis (and packaged with the service), or system wide. Systemd can also try arbitrary commands before sending SIGTERM.

    Other init systems have similar timeouts, and nesting of init systems reduces the available inner timeouts.

    Humans are also rather variable as to how tolerant they are of slow shutdowns.