Created: 2023-01-26 08:25
Status: #concept
Subject: Network Engineering System Administration
Tags: Network Linux Kernel Bash
Signal
A notification (or event) to a process that something has happened.
- in terms of Networking, signals are Data being sent to and from Devices.
- in terms of Linux, they serve as software interrupts.
Use Cases
- A user can type one of the special terminal characters (
Ctrl-C
) or (Ctrl-Z
) to kill, interrupt or suspend processes. - Hardware issues can occur and the kernel wants to notify the process.
- Software issues can occur and the kernel wants to notify the process.
- They are basically ways processes can communicate.
Common Signals
Each signal is defined by Integer with symbolic names that are in the form of
SIGxxx
.
- numbers may vary, so we refer to them by their Symbolic Names.
Symbolic Name | Shorthand | Integer | Description |
---|---|---|---|
SIGHUP |
HUP |
1 |
Hangup, sent to a process when the controlling terminal is closed. |
SIGINT |
INT |
2 |
Interrupt, so you can use Ctrl-C and the system will try to gracefully kill the process. |
SIGKILL |
KILL |
9 |
Kill (unblockable & no cleanup) |
SIGSEGV |
SRGV |
11 |
Segmentation Fault |
SIGTERM |
TERM |
15 |
Kill the process, but allow it to do some cleanup first. |
SIGSTOP |
STOP |
Stop and suspent a process which we can KILL -CONT <pid> it. |