Preface
Linux system programming is all about developing system programs for the Linux operating system. Linux is the world's most popular open-source operating system and runs on everything from big servers to small Internet of Things (IoT) devices. Knowing how to write system programs for Linux will enable you to extend the operating system and connect it with other programs and systems.
We'll start by learning how to make our programs easy to script and easy to interact with other programs. When we write system programs for Linux, we should always strive to make them small and do one thing only—and do it well. This is one of the key concepts in Linux: to create small programs that can exchange data with each other in simple ways.
As we move ahead, we'll take a deep dive into C and look at how the compiler works, what the linker does, how to write Makefiles, and much more.
Then, we'll learn all about forking and daemons. We'll also create our own daemon. We will then put our daemon under systemd's control. This will enable us to start, stop, and restart the daemon using built-in Linux tools.
We will also learn how to make our processes exchange information using different kinds of Inter-Process Communication (IPC). We'll also take a look at how to write threaded programs.
At the end of this book, we'll cover how to debug our programs using the GNU Debugger (GDB) and Valgrind.
By the end of this book, you'll be able to write a wide variety of system programs for Linux—everything from filters to daemons.