SIGTERM
SIGTERM (signal number 15) is a termination request sent to a process in POSIX-compliant systems. It is intended to allow graceful shutdown, giving the process a chance to release resources and save state before exiting.
Delivery and handling: The kernel delivers SIGTERM to a process. The default action is to terminate the
Sending: The command “kill -TERM pid” or “kill -s TERM pid” sends SIGTERM. Utilities like killall or
Programmatic use: In C, a handler can be installed with signal(SIGTERM, handler) or with sigaction for more
Notes: SIGTERM is portable across Linux, macOS, and BSD systems. Windows does not implement POSIX signals in