Linux Basics Practice Test: Signal Handling — Flashcards | Linux | FatSkills

Linux Basics Practice Test: Signal Handling — Flashcards

Fast review mode: answers are shown by default so you can skim quickly. Hide them if you want to self-test.

In Linux, a signal is a notification or message that the operating system or another application sends to a program. Signals are assigned numbers between 1 and 31, and are usually self-explanatory. For example, signal number 9, or SIGKILL, informs the program that it is being attempting to be killed. 

When a process receives a signal, it stops execution and handles the signal. The behavior depends on the signal. 
For example, SIGINT terminates the process. 

Here are some default actions for signals:
SIGHUP, SIGINT, SIGKILL:
Kills the process
SIGQUIT: Kills the process and forces a core dump
SIGSTOP, SIGTTIN: Stops the process
SIGCONT: Continues a stopped process
SIGCHLD: Is ignored 

You can set up a handler for the signal using the signal system call. You can also block signals, which means that when a signal is blocked, it is not delivered but remains pending. 
Signals are often described as software interrupts, but they aren't actually asynchronous. When a signal is sent to a process, the kernel adds it to the process' pending signal set. 

1 of 10 Ready
If a signal is received by a process, when will it be processed?
It is processed when process is switching to kernel mode
Shortcuts
Prev Space Show / hide Next
Turn this into a study set.
Sign in with Google to save tricky questions to your reminder list and resume on any device.
Sign in with Google Free • no extra password