Foreword
Preface
1. Introduction and Essential Concepts
System Programming
Why Learn System Programming
Cornerstones of System Programming
System Calls
The C Library
The C Compiler
APIs and ABIs
APIs
ABIs
Standards
POSIX and SUS History
C Language Standards
Linux and the Standards
This Book and the Standards
Concepts of Linux Programming
Files and the Filesystem
Processes
Users and Groups
Permissions
Signals
Interprocess Communication
Headers
Error Handling
Getting Started with System Programming
2. File IO
Opening Files
The open System Call
Owners of New Files
Permissions of New Files
The creat0 Function
Return Values and Error Codes
Reading via read
Return Values
Reading All the Bytes
Nonblocking Reads
Other Error Values
Size Limits on read
Writing with write
Partial Writes
Append Mode
Nonblocking Writes
Other Error Codes
Size Limits on write
Behavior of write
Synchronized IO
fsync0 and fdatasync0
sync0
The O SYNC Flag
O_DSYNC and O_RSYNC
Direct IO
Closing Files
Error Values
Seeking with lseek0
Seeking Past the End of a File
Error Values
Limitations
Positional Reads and Writes
Error Values
Truncating Files
Multiplexed IO
select
poll
poll Versus select
Kernel Internals
……
3. Buffered IO
4. Advanced File IO
5. Process Management
6. Advanced Process Management
7. Threading
8. File and Directory Management
9. Memory Management
10. Signals
11. Time
A. GCC Extensions to the C Language
B. Bibliography
Index