3 - Signals Flashcards
What is a signal?
A mechanism for notifying a process that an event has occurred.
True or false: events can occur at any time and come from an external source.
True.
Can processes block some signals, even overwrite?
Yes
Can a process ignore a kill command?
No.
True or false: Each signal type has a system-defined default action.
True.
What are some actions a process may choose when dealing with a signal?
Ignore.
Default.
Programmer-specified handler.
What are the exceptions to the Ignore action?
SIGKILL and SIGSTOP.
What does a system call signal do?
Captures a specific function and associates it with a programmer-defined function.
How do you use signal system calls?
Requires that you include “signal.h” library
What does SIGINT do?
Interrupt signal from terminal (ctrl + c)
What does SIGTSTP do?
Stop signal from terminal (ctrl + z)
What does SIGCHLD do?
A child process has stopped or terminated.