CSC209H1 Lecture Notes - Lecture 11: Process Control Block, System Call, Polskie Radio Program Iii
Document Summary
Signals are a mechanism that allows a process or the operating system to interrupt a currently running process, and notify it that an event has occurred. You can change the code for the action that is performed when a particular signal is given to a process: for now, we will focus on how signals work. Each signal is identi ed between 1 and 31, and de ned constants are used to give them names. Each one is paired with a default action that it will perform when that signal is received. Ex. when we type ctrl-c, it sends the sigint signal, which will terminate the program. When we type ctrl-z, it sends the sigstop signal, and the process will suspend execution. How can we send arbitrary signals to a function: with a library called kill or from the command line using kill . From the command line, you can: kill -stop pid.