Understanding Linux Process Signals
A Brief Introduction to types of process signals, usage of kill and trap commands
Understanding signals are tricky in Linux. I have to be honest, I am not completely aware of all the types of signals that possibly exist, I only came across a few commonly used ones. This article provides an overview of commonly encountered signals and how to handle signals in a bash script.
What is a signal?
A signal is an event generated by the system in response to a specific condition. When a process receives a signal it may take an action. A standard signal has a default disposition and it determines the behavior of the process after it is delivered.
Signals can be sent to a process when the system detects a software event. It can either be a user-generated signal or a process generated signal. A kernel could also send a signal when a hardware event has occurred or to note that an I/O event is completed.
The default disposition for each standard signal can be one of the following options as specified in the manpage:
Term Default action is to terminate the process.Ign Default action is to ignore the signal.Core Default action is to terminate the…