Signaling processes

  • Processes listen for signals sent by the kernel or users using the kill command:

    kill -sigspec [pids]

    Send sigspec to pids.

  • The killall command is used to send signals to processes by program name instead of PID.

  • Common kill signals are listed in Table 10-6.

Table 10-6. Common signals

Signal

Number

Meaning

HUP

1

Hangup, reread configuration.

INT

2

Interrupt, stop running.

KILL

9

Exit immediately.

TERM

15

Terminate nicely.

TSTP

20

Stop executing.

Get LPI Linux Certification in a Nutshell, 3rd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.