Praise for Advanced Programming in the UNIX® Environment, Second Edition
Addison-Wesley Professional Computing Series
Changes from the First Edition
Systems Used to Test the Examples
Chapter 1. UNIX System Overview
Section 1.2. UNIX Architecture
Section 1.4. Files and Directories
Section 1.6. Programs and Processes
Section 1.8. User Identification
Section 1.11. System Calls and Library Functions
Chapter 2. UNIX Standardization and Implementations
Section 2.2. UNIX Standardization
Section 2.3. UNIX System Implementations
Section 2.4. Relationship of Standards and Implementations
Section 2.7. Feature Test Macros
Section 2.8. Primitive System Data Types
Section 2.9. Conflicts Between Standards
Section 3.11. Atomic Operations
Section 3.12. dup and dup2 Functions
Section 3.13. sync, fsync, and fdatasync Functions
Chapter 4. Files and Directories
Section 4.2. stat, fstat, and lstat Functions
Section 4.4. Set-User-ID and Set-Group-ID
Section 4.5. File Access Permissions
Section 4.6. Ownership of New Files and Directories
Section 4.9. chmod and fchmod Functions
Section 4.11. chown, fchown, and lchown Functions
Section 4.15. link, unlink, remove, and rename Functions
Section 4.17. symlink and readlink Functions
Section 4.20. mkdir and rmdir Functions
Section 4.21. Reading Directories
Section 4.22. chdir, fchdir, and getcwd Functions
Section 4.23. Device Special Files
Section 4.24. Summary of File Access Permission Bits
Chapter 5. Standard I/O Library
Section 5.2. Streams and FILE Objects
Section 5.3. Standard Input, Standard Output, and Standard Error
Section 5.6. Reading and Writing a Stream
Section 5.7. Line-at-a-Time I/O
Section 5.8. Standard I/O Efficiency
Section 5.10. Positioning a Stream
Section 5.12. Implementation Details
Section 5.14. Alternatives to Standard I/O
Chapter 6. System Data Files and Information
Section 6.5. Supplementary Group IDs
Section 6.6. Implementation Differences
Section 6.9. System Identification
Section 6.10. Time and Date Routines
Chapter 7. Process Environment
Section 7.3. Process Termination
Section 7.4. Command-Line Arguments
Section 7.6. Memory Layout of a C Program
Section 7.8. Memory Allocation
Section 7.9. Environment Variables
Section 7.10. setjmp and longjmp Functions
Section 7.11. getrlimit and setrlimit Functions
Section 8.2. Process Identifiers
Section 8.6. wait and waitpid Functions
Section 8.8. wait3 and wait4 Functions
Section 8.11. Changing User IDs and Group IDs
Section 8.12. Interpreter Files
Section 8.14. Process Accounting
Section 8.15. User Identification
Chapter 9. Process Relationships
Section 9.6. Controlling Terminal
Section 9.7. tcgetpgrp, tcsetpgrp, and tcgetsid Functions
Section 9.9. Shell Execution of Programs
Section 9.10. Orphaned Process Groups
Section 9.11. FreeBSD Implementation
Section 10.4. Unreliable Signals
Section 10.5. Interrupted System Calls
Section 10.6. Reentrant Functions
Section 10.7. SIGCLD Semantics
Section 10.8. Reliable-Signal Terminology and Semantics
Section 10.9. kill and raise Functions
Section 10.10. alarm and pause Functions
Section 10.12. sigprocmask Function
Section 10.13. sigpending Function
Section 10.14. sigaction Function
Section 10.15. sigsetjmp and siglongjmp Functions
Section 10.16. sigsuspend Function
Section 10.18. system Function
Section 10.20. Job-Control Signals
Section 10.21. Additional Features
Section 11.3. Thread Identification
Section 11.5. Thread Termination
Section 11.6. Thread Synchronization
Section 12.3. Thread Attributes
Section 12.4. Synchronization Attributes
Section 12.6. Thread-Specific Data
Section 12.8. Threads and Signals
Section 12.9. Threads and fork
Section 12.10. Threads and I/O
Section 13.2. Daemon Characteristics
Section 13.5. Single-Instance Daemons
Section 13.6. Daemon Conventions
Section 13.7. ClientServer Model
Section 14.5. I/O Multiplexing
Section 14.6. Asynchronous I/O
Section 14.7. readv and writev Functions
Section 14.8. readn and writen Functions
Section 14.9. Memory-Mapped I/O
Chapter 15. Interprocess Communication
Section 15.3. popen and pclose Functions
Section 15.10. ClientServer Properties
Chapter 16. Network IPC: Sockets
Section 16.2. Socket Descriptors
Section 16.4. Connection Establishment
Section 16.7. Out-of-Band Data
Section 16.8. Nonblocking and Asynchronous I/O
Section 17.2. STREAMS-Based Pipes
Section 17.3. UNIX Domain Sockets
Section 17.4. Passing File Descriptors
Section 17.5. An Open Server, Version 1
Section 17.6. An Open Server, Version 2
Section 18.3. Special Input Characters
Section 18.4. Getting and Setting Terminal Attributes
Section 18.5. Terminal Option Flags
Section 18.7. Baud Rate Functions
Section 18.8. Line Control Functions
Section 18.9. Terminal Identification
Section 18.11. Noncanonical Mode
Section 18.12. Terminal Window Size
Section 18.13. termcap, terminfo, and curses
Section 19.3. Opening Pseudo-Terminal Devices
Section 19.4. pty_fork Function
Section 19.6. Using the pty Program
Section 19.7. Advanced Features
Chapter 20. A Database Library
Section 20.4. Implementation Overview
Section 20.5. Centralized or Decentralized?
Section 20.7. Building the Library
Chapter 21. Communicating with a Network Printer
Section 21.2. The Internet Printing Protocol
Section 21.3. The Hypertext Transfer Protocol
Section 21.4. Printer Spooling
Appendix A. Function Prototypes
Appendix B. Miscellaneous Source Code