The Linux Programming Interface
|
关于本书
《The Linux Programming Interface》(TLPI) 是 Michael Kerrisk 撰写的 Linux/UNIX 系统编程权威参考书。本书系统全面地介绍了 Linux 系统调用、库函数以及 UNIX 系统编程的方方面面,覆盖文件 I/O、进程、内存、信号、线程、进程间通信、套接字、终端等核心主题。 本书共 64 章 + 6 个附录:
|
阅读建议
-
作为手册:每章独立,按需查阅特定系统调用或特性。
-
系统学习:从第 1 章开始,按顺序读完,重点关注代码示例与练习。
-
配套代码:原书所有示例程序源码可从 man7.org 下载,强烈建议实际编译运行。
章节列表
| 章节 | 标题 |
|---|---|
历史与标准 (History and Standards) |
|
基本概念 (Fundamental Concepts) |
|
系统编程概念 (System Programming Concepts) |
|
文件 I/O:通用 I/O 模型 (File I/O: The Universal I/O Model) |
|
文件 I/O:进一步细节 (File I/O: Further Details) |
|
进程 (Processes) |
|
内存分配 (Memory Allocation) |
|
用户与组 (Users and Groups) |
|
进程凭证 (Process Credentials) |
|
时间 (Time) |
|
系统限制与选项 (System Limits and Options) |
|
系统与进程信息 (System and Process Information) |
|
文件 I/O 缓冲 (File I/O Buffering) |
|
文件系统 (File Systems) |
|
文件属性 (File Attributes) |
|
扩展属性 (Extended Attributes) |
|
访问控制列表 (Access Control Lists) |
|
目录与链接 (Directories and Links) |
|
监控文件事件 (Monitoring File Events) |
|
信号:基本概念 (Signals: Fundamental Concepts) |
|
信号:信号处理函数 (Signals: Signal Handlers) |
|
信号:高级特性 (Signals: Advanced Features) |
|
定时器与休眠 (Timers and Sleeping) |
|
进程创建 (Process Creation) |
|
进程终止 (Process Termination) |
|
监控子进程 (Monitoring Child Processes) |
|
程序执行 (Program Execution) |
|
进程创建与程序执行的更多细节 (Process Creation and Program Execution in More Detail) |
|
线程:简介 (Threads: Introduction) |
|
线程:线程同步 (Threads: Thread Synchronization) |
|
线程:线程安全与每线程存储 (Threads: Thread Safety and Per-Thread Storage) |
|
线程:线程取消 (Threads: Thread Cancellation) |
|
线程:进一步细节 (Threads: Further Details) |
|
进程组、会话与作业控制 (Process Groups, Sessions, and Job Control) |
|
进程优先级与调度 (Process Priorities and Scheduling) |
|
进程资源 (Process Resources) |
|
守护进程 (Daemons) |
|
编写安全的特权程序 (Writing Secure Privileged Programs) |
|
能力 (Capabilities) |
|
登录记账 (Login Accounting) |
|
共享库基础 (Fundamentals of Shared Libraries) |
|
共享库高级特性 (Advanced Features of Shared Libraries) |
|
进程间通信概述 (Interprocess Communication Overview) |
|
管道与 FIFO (Pipes and FIFOs) |
|
System V IPC 简介 (Introduction to System V IPC) |
|
System V 消息队列 (System V Message Queues) |
|
System V 信号量 (System V Semaphores) |
|
System V 共享内存 (System V Shared Memory) |
|
内存映射 (Memory Mappings) |
|
虚拟内存操作 (Virtual Memory Operations) |
|
POSIX IPC 简介 (Introduction to POSIX IPC) |
|
POSIX 消息队列 (POSIX Message Queues) |
|
POSIX 信号量 (POSIX Semaphores) |
|
POSIX 共享内存 (POSIX Shared Memory) |
|
文件锁定 (File Locking) |
|
套接字:简介 (Sockets: Introduction) |
|
套接字:UNIX 域 (Sockets: UNIX Domain) |
|
套接字:TCP/IP 网络基础 (Sockets: Fundamentals of TCP/IP Networks) |
|
套接字:因特网域 (Sockets: Internet Domains) |
|
套接字:服务器设计 (Sockets: Server Design) |
|
套接字:高级主题 (Sockets: Advanced Topics) |
|
终端 (Terminals) |
|
备选 I/O 模型 (Alternative I/O Models) |
|
伪终端 (Pseudoterminals) |
|
跟踪系统调用 (Tracing System Calls) |
|
解析命令行选项 (Parsing Command-Line Options) |
|
NULL 指针的转换 (Casting the NULL Pointer) |
|
内核配置 (Kernel Configuration) |
|
进一步信息来源 (Further Sources of Information) |
|
部分习题解答 (Solutions to Selected Exercises) |
系统调用分类
本书覆盖的核心系统调用按主题分类:
-
文件 I/O:
open/read/write/close/lseek/fcntl/pread/pwrite/readv/writev/dup/sync -
进程:
fork/exec/exit/wait/waitpid/getpid/getppid -
信号:
signal/sigaction/kill/alarm/setitimer -
线程:
pthread_create/pthread_exit/pthread_join/pthread_mutex_*/pthread_cond_* -
内存:
brk/sbrk/mmap/munmap/mprotect -
IPC:
pipe/msgget/semget/shmget/mq_open/sem_open/shm_open -
套接字:
socket/bind/listen/accept/connect/send/recv/select/poll/epoll -
时间:
time/gettimeofday/clock_gettime/nanosleep/timerfd_*