-
Chapter 1 Introduction and Essential Concepts
-
System Programming
-
APIs and ABIs
-
Standards
-
Concepts of Linux Programming
-
Getting Started with System Programming
-
-
Chapter 2 File I/O
-
Opening Files
-
Reading via read( )
-
Writing with write( )
-
Synchronized I/O
-
Direct I/O
-
Closing Files
-
Seeking with lseek( )
-
Positional Reads and Writes
-
Truncating Files
-
Multiplexed I/O
-
Kernel Internals
-
Conclusion
-
-
Chapter 3 Buffered I/O
-
User-Buffered I/O
-
Standard I/O
-
Opening Files
-
Opening a Stream via File Descriptor
-
Closing Streams
-
Reading from a Stream
-
Writing to a Stream
-
Sample Program Using Buffered I/O
-
Seeking a Stream
-
Flushing a Stream
-
Errors and End-of-File
-
Obtaining the Associated File Descriptor
-
Controlling the Buffering
-
Thread Safety
-
Critiques of Standard I/O
-
Conclusion
-
-
Chapter 4 Advanced File I/O
-
Scatter/Gather I/O
-
The Event Poll Interface
-
Mapping Files into Memory
-
Advice for Normal File I/O
-
Synchronized, Synchronous, and Asynchronous Operations
-
I/O Schedulers and I/O Performance
-
Conclusion
-
-
Chapter 5 Process Management
-
The Process ID
-
Running a New Process
-
Terminating a Process
-
Waiting for Terminated Child Processes
-
Users and Groups
-
Sessions and Process Groups
-
Daemons
-
Conclusion
-
-
Chapter 6 Advanced Process Management
-
Process Scheduling
-
Yielding the Processor
-
Process Priorities
-
Processor Affinity
-
Real-Time Systems
-
Resource Limits
-
-
Chapter 7 File and Directory Management
-
Files and Their Metadata
-
Directories
-
Links
-
Copying and Moving Files
-
Device Nodes
-
Out-of-Band Communication
-
Monitoring File Events
-
-
Chapter 8 Memory Management
-
The Process Address Space
-
Allocating Dynamic Memory
-
Managing the Data Segment
-
Anonymous Memory Mappings
-
Advanced Memory Allocation
-
Debugging Memory Allocations
-
Stack-Based Allocations
-
Choosing a Memory Allocation Mechanism
-
Manipulating Memory
-
Locking Memory
-
Opportunistic Allocation
-
-
Chapter 9 Signals
-
Signal Concepts
-
Basic Signal Management
-
Sending a Signal
-
Reentrancy
-
Signal Sets
-
Blocking Signals
-
Advanced Signal Management
-
Sending a Signal with a Payload
-
Conclusion
-
-
Chapter 10 Time
-
Time's Data Structures
-
POSIX Clocks
-
Getting the Current Time of Day
-
Setting the Current Time of Day
-
Playing with Time
-
Tuning the System Clock
-
Sleeping and Waiting
-
Timers
-
-
Appendix GCC Extensions to the C Language
-
GNU C
-
Inline Functions
-
Suppressing Inlining
-
Pure Functions
-
Constant Functions
-
Functions That Do Not Return
-
Functions That Allocate Memory
-
Forcing Callers to Check the Return Value
-
Marking Functions As Deprecated
-
Marking Functions As Used
-
Marking Functions or Parameters As Unused
-
Packing a Structure
-
Increasing the Alignment of a Variable
-
Placing Global Variables in a Register
-
Branch Annotation
-
Getting the Type of an Expression
-
Getting the Alignment of a Type
-
The Offset of a Member Within a Structure
-
Obtaining the Return Address of a Function
-
Case Ranges
-
Void and Function Pointer Arithmetic
-
More Portable and More Beautiful in One Fell Swoop
-
-
Bibliography
-
Colophon
- Title:
- Linux System Programming
- By:
- Robert Love
- Publisher:
- O'Reilly Media
- Formats:
-
- Ebook
- Safari Books Online
- Print Release:
- September 2007
- Ebook Release:
- February 2009
- Pages:
- 400
- Print ISBN:
- 978-0-596-00958-8
- | ISBN 10:
- 0-596-00958-5
- Ebook ISBN:
- 978-0-596-15923-8
- | ISBN 10:
- 0-596-15923-4
The image on the cover of Linux System Programming is a man in a flying machine. Well before the Wright brothers achieved their first controlled heavier-than-air flight in 1903, people around the world attempted to fly by simple and elaborate machines. In the second or third century, Zhuge Liang of China reportedly flew in a Kongming lantern, the first hot air balloon. Around the fifth or sixth centuries, many Chinese people purportedly attached themselves to large kites to fly through the air.
It is also said that the Chinese created spinning toys that were early versions of helicopters, the designs of which may have inspired Leonardo da Vinci in his initial attempts at a solution to human flight. da Vinci also studied birds and designed parachutes, and in 1845, he designed an ornithopter, a wing-flapping machine meant to carry humans through the air. Though he never built it, the ornithopter's birdlike structure influenced the design of flying machines throughout the centuries.
The flying machine depicted on the cover is more elaborate than James Means' model soaring machine of 1893, which had no propellers. Means later printed an instruction manual for his soaring machine, which in part states that "the summit of Mt. Willard, near the Crawford House, N.H., will be found an excellent place" to experiment with the machines.
But such experimentation was often dangerous. In the late nineteenth century, Otto Lilienthal built monoplanes, biplanes, and gliders. He was the first to show that control of human flight was within reach, and he gained the nickname "father of aerial testing," as he conducted more than 2,000 glider flights, sometimes traveling more than a thousand feet. He died in 1896 after breaking his spine during a crash landing.
Flying machines are also known as mechanical birds and airships, and are occasionally called by more colorful names such as the Artificial Albatross. Enthusiasm for flying machines remains high, as aeronautical buffs still build early flying machines today.
The cover image and chapter opening graphics are from the Dover Pictorial Archive. The cover font is Adobe ITC Garamond. The text font is Linotype Birka; the heading font is Adobe Myriad Condensed; and the code font is LucasFont's TheSans Mono Condensed.
