Signals
A signal is a software interrupt to notify processes that an external event has occurred. In a normal execution, processes keeps running as expected. Now, for some reason, a user may want to cancel a running process
. When the process is started from a terminal, it will terminate when we hit the Ctrl + c keys or run the kill
command.
When we press Ctrl + c keys while process is running in a terminal, a signal SIGINT
is generated and sent to the process running in foreground. Also, when the kill
command is called on process, the SIGKILL
signal is generated and the process is terminated.
Available signals
Among all available signals, we will discuss the frequently used signals here:
Signal name |
Value |
Default Action |
Description |
---|---|---|---|
SIGHUP |
1 |
Term |
This signal is used to Hangup or death of controlling process |
SIGINT |
2 |
Term |
This signal is used to interrupt from keyboard like ctrl + c, ctrl + z |
SIGQUIT |
3 |
Core |
This signal is used to quit from keyboard |
SIGILL |
4 |
Core |
It is used to... |