Signals #

Lesson Content #

A signal is a notification to a process that something has happened.

Why we have signals

They are software interrupts and they have lots of uses:

Signal process

When a signal is generated by some event, it’s then delivered to a process, it’s considered in a pending state until it’s delivered. When the process is ran, the signal will be delivered. However, processes have signal masks and they can set signal delivery to be blocked if specified. When a signal is delivered, a process can do a multitude of things:

Common signals

Each signal is defined by integers with symbolic names that are in the form of SIGxxx. Some of the most common signals are:

Numbers can vary with signals so they are usually referred by their names.

Some signals are unblockable, one example is the SIGKILL signal. The KILL signal destroys the process.

Exercise #

No exercises for this lesson.

Quiz Question #

What signal is unblockable?

Quiz Answer #

SIGKILL