It is possible to monitor processes and to tell them to terminate, pause, continue, etc. To understand the examples we are going to examine, it is helpful to know a bit more about processes.
As with files, all processes which run on a GNU/Linux system are organized in a tree form. The root of this tree is init, a system-level process which is started at boot time. The system assigns a number (PID, Process ID) to each process in order to uniquely identify processes. They also inherit the PID of their parent process (PPID, Parent Process ID). init is its own father: the PID and PPID of init is 1.
Every process in UNIX® can
react to signals sent to it. There are 64 different signals which are
identified either by their number (starting from 1
)
or by their symbolic names (SIGx
, where
x
is the signal's name). The 32 “higher”
signals (33
to 64
) are real-time
signals and are beyond the scope of this chapter. For each of these
signals, the process can define its own behavior, except for two
signals: signal number 9 (KILL
) and number 19
(STOP
).
Signal 9
terminates a process irrevocably without giving it the time to terminate
properly. This is the signal you send to a process which is stuck or
exhibits other problems. A full list of signals is available using the
kill -l command.