Processes and threads are the foundations of any computation. A program is rarely made of just one thread or process. In this chapter, you will learn the fundamental recipes for dealing with threads and processes. You will also learn how easy and convenient it is to deal with threads compared with the Portable Operating System Interface (POSIX). Learning these skills is very important as part of the core skills of a system developer. C++ does not have the notion of process in its standard library, so the Linux native implementation will be used.
This chapter will cover the following recipes:
- Starting a new process
- Killing a process
- Creating a new thread
- Creating a daemon process