unix环境高级编程英文版(第2版)是被誉为UNIX编程“圣经”的Advanced Programming in the UNIX Environment一书的更新版。在《UNIX环境高级编程(英文版·第2版)》第1版出版后的十几年中,UNIX行业已经有了巨大的变化,特别是影响UNIX编程接口的有关标准变化很大。《UNIX环境高级编程(英文版·第2版)》在保持了前一版的风格的基础上,根据最新的标准对内容进行了修订和增补,反映了最新的技术发展。书中除了介绍UNIX文件和目录、标准I/O库、系统数据文件和信息、进程环境、进程控制、进程关系、信号、线程、线程控制、守护进程、各种I/O、进程间通信、网络IPC、伪终端等方面的内容,还在此基础上介绍了多个应用示例,包括如何创建数据库函数库以及如何与网络打印机通信等。此外,还在附录中给出了函数原型和部分习题的答案。UNIX环境高级编程(英文版·第2版) 目录 Chapter 1. UNIX System Overview 11.1 Introduction 11.2 UNIX Architecture 11.3 Logging In 21.4 Files and Directories 41.5 Input and Output 81.6 Programs and Processes 101.7 Error Handling 141.8 User Identification 161.9 Signals 181.10 Time values 201.11 System Calls and Library Functions 211.12 Summary 23Chapter 2. UNIX Standardization and Implementations 252.1 Introduction 252.2 UNIX Standardization 252.2.1 ISO C 252.2.2 IEEE POSIX 262.2.3 The Single UNIX Specification 292.2.4 FIPS 332.3 UNIX System Implementations 332.3.1 UNIX System V Release 4 332.3.2 4.4BSD 342.3.3 FreeBSD 352.3.4 Linux 352.3.5 Mac OS X 352.3.6 Solaris 352.3.7 Other UNIX Systems 362.4 Relationship of Standards and Implementations 362.5 Limits 362.5.1 ISO C Limits 382.5.2 POSlX Limits 382.5.3 XSl Limits 402.5.4 sysconf, pathconf, and fpathconf Functions 412.5.5 Indeterminate Runtime Limits 482.6 Options 522.7 Feature Test Macros 552.8 Primitive System Data Types 562.9 Conflicts Between Standards 562.10 Summary 58Chapter 3. File I/0 593.1 Introduction 593.2 File Des criptors 593.3 open Function 603.4 creat Function 623.5 close Function 633.6 1 seek Function 633.7 read Function 673.8 write Function 683.9 I/O Efficiency 683.10 File Sharing 703.11 Atomic Operations 743.12 dup and dup2 Functions 763.13 sync, fsync, and fdatasync Functions 773.14 fcnt 1 Function 783.15 ioct 1 Function 833.16 /dev/fd 843.17 Summary 85Chapter 4. Files and Directories 874.1 Introduction 874.2 stat, fstat, and lstat Functions 874.3 File Types 884.4 Set-User-ID and Set-Group-ID 914.5 File Access Permissions 924.6 Ownership of New Files and Directories 954.7 access Function 954.8 umask Function 974.9 chmod and f chmod Functions 994.10 Sticky Bit 1014.11 chown, fchown, and lchown Functions 1024.12 File Size 1034.13 File Truncation 1054.14 File Systems 1054.15 link, unlink, remove, and rename Functions 1084.16 Symbolic Links 1124.17 syml ink and readlink Functions 1154.18 File Times 1154.19 ut ime Function 1164.20 mkdir and rmdir Functions 1194.21 Reading Directories 1204.22 chdir, fchdir, and getcwd Functions 1254.23 Device Special Files 1274.24 Summary of File Access Permission Bits 1304.25 Summary 130Chapter 5. Standard I/O Library 1335.1 Introduction 1335.2 Streams and FILE Objects 1335.3 Standard Input, Standard Output, and Standard Error 1355.4 Buffering 1355.5 Opening a Stream 1385.6 Reading and Writing a Stream 1405.7 Line-at-a-Time I/O 1425.8 Standard I/O Efficiency 1435.9 Binary I/O 1455.10 Positioning a Stream 1475.11 Formatted I/O 1495.12 Implementation Details 1535.13 Temporary Files 1555.14 Alternatives to Standard I/O 1595.15 Summary 159Chapter 6. System Data Files and Information 1616.1 Introduction 1616.2 Password File 1616.3 Shadow Passwords 1656.4 Group File 1666.5 Supplementary Group IDs 1676.6 Implementation Differences 1696.7 Other Data Files 1696.8 Login Accounting 1706.9 System Identification 1716.10 Time and Date Routines 1736.11 Summary 177Chapter 7. Process Environment 1797.1 Introduction 1797.2 main Function 1797.3 Process Termination 1807.4 Command-Line Arguments 1857.5 Environment List 1857.6 Memory Layout of a C Program 1867.7 Shared Libraries 1887.8 Memory Allocation 1897.9 Environment Variables 1927.10 set j mp and longj mp Functions 1957.11 getrlimit and setrlimit Functions 2027.12 Summary 206Chapter 8. Process Control 2098.1 Introduction 2098.2 Process Identifiers 2098.3 fork Function 2118.4 vfork Function 2168.5 exit Functions 2188.6 wait and waitpid Functions 2208.7 waitid Function 226