新书报道
当前位置: 首页 >> 电类优秀教材 >> 正文
Advanced programming in the UNIX environment = UNIX环境高级编程
发布日期:2016-06-07  浏览

[内容简介]

本书是被誉为UNIX编程“圣经”的AdvancedProgrammingintheUNIXEnvironment一书的第3版。在本书第2版出版后的8年中,UNIX行业发生了巨大的变化,特别是影响UNIX编程接口的有关标准变化很大。本书在保持前一版风格的基础上,根据最新的标准对内容进行了修订和增补,反映了最新的技术发展。书中除了介绍UNIX文件和目录、标准I/O库、系统数据文件和信息、进程环境、进程控制、进程关系、信号、线程、线程控制、守护进程、各种I/O、进程间通信、网络IPC、伪终端等方面的内容,还在此基础上介绍了众多应用实例,包括如何创建数据库函数库以及如何与网络打印机通信等。此外,还在附录中给出了函数原型和部分习题的答案。

[目录]

Chapter 1.UNIX System Overview 
1.1 Introduction 1 
1.2 UNIX Architecture 1 
1.3 Logging In 2 
1.4 Files and Directories 4 
1.5 Input and Output 8 
1.6 Programs and Processes 10 
1.7 Error Handling 14 
1.8 User Identification 16 
1.9 Signals 18 
1.10 Time Values 20 
1.11 System Calls and Library Functions 21 
1.12 Summary 23 
Chapter 2.UNIX Standardization and Implementations 
2.1 Introduction 25 
2.2 UNIX Standardization 25 
2.2.1 ISO C 25 
2.2.2 IEEE POSIX 26 
2.2.3 The Single UNIX Specification 30 
2.2.4 FIPS 32 
2.3 UNIX System Implementations 33 
2.3.1 UNIX System V Release 433 
2.3.24.4BSD 34 
2.3.3 FreeBSD 34 
2.3.4 Linux 35 
2.3.5 Mac OS X 35 
2.3.6 Solaris 35 
2.3.7 Other UNIX Systems 35 
2.4 Relationship of Standards and Implementations 
2.5 Limits 36 
2.5.1 ISO C Limits 37 
2.5.2 POSIX Limits 38 
2.5.3 XSI Limits 41 
2.5.4 sysconf,pathconf,and fpathconf Functions 42 
2.5.5 Indeterminate Runtime Limits 49 
2.6 Options 53 
2.7 Feature Test Macros 57 
2.8 Primitive System Data Types 58 
2.9 Differences Between Standards 58 
2.10 Summary 60 
Chapter 3.File 1/0 
3.1 Introduction 61 
3.2 File Descriptors 61 
3.3 open and openat Functions 62 
3.4 creat Function 66 
3.5 close Function 66 
3.6 lseek Function 66 
3.7 read Function 71 
3.8 write Function 72 
3.9110 Efficiency 72 
3.10 File Sharing 74 
3.11 Atomic Operations 77 
3.12 dup and dup2 Functions 79 
3.13 sync,fsync,and fdatasync Functions 81 
3.14 fcntl Function 82 
3.15 ioctl Function 87 
3.16/dev/fd 88 
3.17 Summary 90 
Chapter 4.Files and Directories 
4.1 Introduction 93 
4.2 stat,fstat,fstatat,and lstat Functions 93 
4.3 File Types 95 
4.4 Set—User—ID and Set—Group—ID 98 
4.5 File Access Permissions 99 
4.6 Ownership of New Files and Directories 101 
4.7 access and faccessat Functions 102 
4.8 umask Function 104 
4.9 chmod,fchmod,and fchmodat Functions 106 
4.10 Sticky Bit 108 
4.11 chown,fchown,fchownat,and lchown 
Functions 109 
4.12 File Size 111 
4.13 File Truncation 112 
4.14 File Systems 113 
4.15 link,linkat,unlink,unlinkat,and remove 
Functions 116 
4.16 rename and renameat Functions 119 
4.17 Symbolic Links 120 
4.18 Creating and Reading Symbolic Links 123 
4.19 File Times 124 
4.20 futimens,utimensat,and utimes Functions 126 
4.21 mkdir,mkdirat,and rmdir Functions 129 
4.22 Reading Directories 130 
4.23 chdir,fchdir,and getcwd Functions 135 
4.24 Device Special Files 137 
4.25 Summary of File Access Permission Bits 140 
4.26 Summary 140 
Chapter 5.Standard VO Library 
5.1 Introduction 143 
5.2 Streams and FILE Objects 143 
5.3 Standard Input,Standard Output,and Standard 
Error 145 
5.4 Buffering 145 
5.5 Opening a Stream 148 
5.6 Reading and Writing a Stream 150 
5.7 Line—at—a—Time 110152 
5.8 Standard l/0 Efficiency 153 
5.9 Binary 110156 
5.10 Positioning a Stream 157 
5.11 Formatted 110159 
5.12 Implementation Details 164 
5.13 Temporary Files 167 
5.14 Memory Streams 171 
5.15 Alternatives to Standard 110174 
5.16 Summary 175 
Chapter 6.System Data Files and Information 
6.1 Introduction 177 
6.2 Password File 177 
6.3 Shadow Passwords 181 
6.4 Group File 182 
6.5 Supplementary Group IDs 183 
6.6 Implementation Differences 184 
6.7 Other Data Files 185 
6.8 Login Accounting 186 
6.9 System Identification 187 
6.10 Time and Date Routines 189 
6.11 Summary 196 
Chapter 7.Process Environment 
7.1 Introduction 197 
7.2 main Function 197 
7.3 Process Termination 198 
7.4 Command—Line Arguments 203 
7.5 Environment List 203 
7.6 Memory Layout of a C Program 204 
7.7 Shared Libraries 206 
7.8 Memory Allocation 207 
7.9 Environment Variables 210 
7.10 setjmp and longjmp Functions 213 
7.11 getrlimit and setrlimit Functions 220 
7.12 Summary 225 
Chapter 8.Process Control 
8.1 Introduction 227 
8.2 Process Identifiers 227 
8.3 fork Function 229 
8.4 vfork Function 234 
8.5 exit Functions 236 
8.6 wait and waitpid Functions 238 
8.7 waitid Function 244 
8.8 wait3 and wait4 Functions 245 
8.9 Race Conditions 245 
8.10 exec Functions 249 
8.11 Changing User IDs and Group IDs 255 
8.12 Interpreter Files 260 
8.13 system Function 264 
8.14 Process Accounting 269 
8.15 User Identification 275 
8.16 Process Scheduling 276 
8.17 Process Times 280 
8.18 Summary 282 
Chapter 9.Process Relationships 
9.1 Introduction 285 
9.2 Terminal Logins 285 
9.3 Network Logins 290 
9.4 Process Groups 293 
9.5 Sessions 295 
9.6 Controlling Terminal 296 
9.7 tcgetpgrp,tcsetpgrp,and tcgetsid 
Functions 298 
9.8 Job Control 299 
9.9 Shell Execution of Programs 303 
9.10 Orphaned Process Groups 307 
9.11 FreeBSD Implementation 310 
9.12 Summary 312 
…… 
Chapter 10.Signals 
Chapter 11.Threads 
Chapter 12.Thread Control 
Chapter 13.Daemon Processes 
Chapter 14.Advanced I/O 
Chapter 15.Interprocess Communication 
Chapter 16.Network IPC: Sockets 
Chapter 17.Advanced IPC 
Chapter 18.Terminal I/O 
Chapter 19.Pseudo Terminals 
Chapter 20.A Database Library 
Chapter 21.Communicating with a Network Printer 
Appendix A.Function Prototypes 
Appendix B.Miscellaneous Source Code 
Appendix C.Solutions to Selected Exercises 
Bibliography

关闭


版权所有:西安交通大学图书馆      设计与制作:西安交通大学数据与信息中心  
地址:陕西省西安市碑林区咸宁西路28号     邮编710049

推荐使用IE9以上浏览器、谷歌、搜狗、360浏览器;推荐分辨率1360*768以上