Signals are essentially software interrupts delivered to a process by the operating system or another process. When a signal is sent to a process, the process is interrupted, and control is transferred to the signal handler. The signal handler can perform a specific action in response, such as cleaning up resources, terminating the process, or ignoring the signal.

If the process doesn’t define a custom signal handler, the OS applies a default action, which could be to terminate the process or ignore the signal, depending on the signal type.

Common Signal Types