Chapter 8: Working with Processes and Signals
Do you know how commands are executed when you type them into a terminal interface on your computer? Are these commands directly executed by the operating system, or is there an intermediate program that handles them? When you run a program from the command line in the foreground, and press Ctrl + C, who is listening to this keypress, and how is the program terminated? How can multiple user programs be run at the same time by the operating system? What is the difference between a program and a process? If you are curious, then read on.
In the previous chapter, we learned how to control and alter the terminal interface that is used to interact with the users in command-line applications.
In this chapter, we will look at processes, which are the second most popular abstraction in systems programming after files. We'll learn what processes are, how they differ from programs, how they are started and terminated, and how the process...