Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
This book was written with GNU/Linux application developers in mind. You’ll note that topics such as the Linux kernel or device drivers are absent. This was intentional, and while they’re fascinating topics in their own right, they are rarely necessary to develop applications and tools in the GNU/Linux environment.
This book is split into five parts, each focusing on different aspects of GNU/Linux programming. Part I, “Introduction,” introduces GNU/Linux for the beginner. It addresses the GNU/Linux architecture, a short introduction to the process model and also licenses, and a brief introduction to open source development and licenses. Linux virtualization is also explored, including models and options in Linux.
Part II, “GNU Tools,” concentrates on the necessary tools for GNU/Linux programming. The de facto standard GNU compiler tool chain is explored, along with the GNU make automated build system. Building and using libraries (both static and dynamic) are then investigated. Coverage testing and profiling are explored, using the gcov and gprof utilities, as is application bundling and distribution with automake and autoconf. Finally, source control is reviewed with some of the popular options on Linux and also data visualization with Gnuplot.
With an introduction to the GNU/Linux architecture and necessary tools for application development, we focus next in Part III, “Application Development Topics,” on the most useful of the services available within GNU/Linux. This includes pipes, Sockets programming, dealing with files, both traditional processes and POSIX threads, message queues, semaphores, and finally shared memory management.
In Part IV, “GNU/Linux Shells and Scripting,” we move up to application development using shells and scripting languages. Some of the most useful GNU/Linux commands that you’ll encounter in programming on GNU/Linux are covered, and there is a tutorial on the Bourne-Again Shell (bash). Text processing is explored using two of the most popular string processing languages (awk and sed). We’ll also look at the topic of parser generation using GNU Flex and Bison utilities (lex and yacc- compatible parser generator). Scripting with Ruby and Python is investigated as well.
In Part V, “Debugging and Testing,” debugging is addressed using a variety of different aspects. We investigate some of the unit-testing frameworks that can help in automated regression. The GNU Debugger is introduced, with treatment of the most common commands and techniques. Finally, the topic of code hardening is explored along with a variety of debugging tools and techniques to assist in the development of reliable and secure GNU/Linux applications.
While the book was written with an implicit order in mind, each chapter can be read in isolation, depending upon your needs. Where applicable, references to other chapters are provided if more information is needed on a related topic.
This book can be read part-by-part and chapter-by-chapter, but a number of threads run through it that can be followed independently. A reader interested in pursuing a particular aspect of the GNU/Linux operating system can concentrate on the following sets of chapters for a given topic thread.
GNU/Linux Inter-Process Communication Methods: Chapters 12, 13, 15, 16, 17, and 18.
Scripting and Text Processing: Chapters 10, 21, 22, 23, 24, 25, 26, and 27.
Building Efficient and Reliable GNU/Linux Applications: Chapters 5, 29, 31, 33, and 34.
Multiprocess and Multithreaded Applications: Chapters 14 and 15.
GNU/Linux Testing and Profiling: Chapters 29, 30, 32, and 33.
GNU Tools for Application Development: Chapters 5, 6, 8, 9, 30, and 34.
GNU Tools for Packaging and Distribution: Chapters 6, 8, 21, and 28.