Defining a signal and its types

A signal is a kind of software interrupt to a process. A signal can also be considered as a notification that needs to be processed for a specific event. Kill, pkill, and killall are programs that are used to deliver these signals to processes. On Linux, every signal name begins with the characters SIG. The signal numbers described in the following table may vary on different Linux hardware platforms, however, in any case, the signal name and meaning will remain the same.

The following table lists the popular signals used for process management, along with their descriptions:

Signal

no.

Signal

name

Meaning

Description

1

SIGHUP

Hangup

Given when controlling Terminal hangup (closed when user is away).

2

SIGINT

Keyboard interrupt

Used to terminate a program using the keyboard key combination Ctrl + C.

3

SIGQUIT

Keyboard quit

Used to terminate a program using the keyboard key combination Ctrl + D.

9

SIGKILL

Terminate

forcefully

Causes the forceful, abrupt termination of a program by the user. Cannot be blocked, ignored, or handled.

15

(default)

SIGTERM

Terminate

gracefully

Terminates the program gracefully. This signal can be blocked, ignored, or handled. It is the default signal sent by the kill command.

18

SIGCONT

Continue

Tells a stopped process to resume.

19

SIGSTOP

Stop

Suspends a process. This signal can't be blocked or handled.

20

SIGTSTP

Keyboard

Stop

Used to suspend a process using the keyboard key combination Ctrl + Z. This signal can be blocked, ignored, or handled.

 

The kill command is used to list all of the signals supported by your Linux, system as shown in the following screenshot:

Each signal has a default action associated with it, such as the termination of a process, stopping a process, continuing a stopped process, and so on.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.71.142