幫助中心 | 我的帳號 | 關於我們

UNIX環境高級編程(第3版英文版上下)

  • 作者:(美)W.理查德·史蒂文斯//史蒂芬·A.拉戈
  • 出版社:人民郵電
  • ISBN:9787115515919
  • 出版日期:2019/10/01
  • 裝幀:平裝
  • 頁數:953
人民幣:RMB 169 元      售價:
放入購物車
加入收藏夾

內容大鋼
    20多年來,嚴謹的C程序員都是依靠一本書來深入了解驅動UNIX和Linux內核的編程介面的實用知識的,這本書就是W.Richard Stevens所著的《UNIX環境高級編程》。現在,Stevens的同事Stephen Rago徹底更新了這本經典著作。新的第3版支持當今領先的系統平台,反映了最新技術進展和最佳實踐,並且符合最新的Single UNIXSpecification 第4版(SUSv4)。
    Rago保留了使本書前版成為經典之作的精髓和方法。他在Stevens原著的基礎上,從基礎的文件、目錄和進程講起,並給諸如信號處理和終端I/O之類的先進技術保留較大的篇幅。他還深入討論了線程和多線程編程、使用套接字介面驅動進程間通信(IPC)等方面的內容。
    這一版涵蓋了70多個新介面,包括POSIX 非同步I/O、旋轉鎖、屏障(barrier)和POSIX信號量。此外,這一版刪除了許多過時的介面,保留了一些廣泛使用的介面。書中幾乎所有實例都已經在主流的4個平台上測試過,包括Solaris10、Mac OS X 10.6.8(Darwin 10.8.0)、FreeBSD 8.0和Ubuntu 12.04(基於Linux 3.2)。
    與前兩版一樣,讀者仍可以通過實例學習,這些實例包括了1 萬多行可下載的ISO C源代碼,書中通過簡明但完整的程序闡述了400多個系統調用和函數,清楚地說明它們的用法、參數和返回值。為了使讀者能融會貫通,書中還提供了幾個貫穿整章的案例,每個案例都根據現在的技術環境進行了全面更新。
    本書幫助幾代程序員寫出了可靠、強大、高性能的代碼。第3版根據當今主流系統進行更新,更具實用價值。

作者介紹
(美)W.理查德·史蒂文斯//史蒂芬·A.拉戈

目錄
Chapter  1. UNIX System Overview / UNIX基礎知識
  1.1  Introduction / 引言
  1.2  UNIX Architecture / UNIX體系結構
  1.3  Logging In / 登錄
  1.4  Files and Directories / 文件和目錄
  1.5  Input and Output / 輸入和輸出
  1.6  Programs and Processes / 程序和進程
  1.7  Error Handling / 出錯處理
  1.8  User Identification / 用戶標識
  1.9  Signals / 信號
  1.10  Time Values / 時間值
  1.11  System Calls and Library Functions / 系統調用和庫函數
  1.12  Summary / 小結
  Exercises  / 習題
Chapter  2. UNIX Standardization and Implementations / UNIX標準及實現
  2.1  Introduction / 引言
  2.2  UNIX Standardization / UNIX標準化
    2.2.1  ISO C
    2.2.2  IEEE POSIX
    2.2.3  The Single UNIX Specification
    2.2.4  FIPS
  2.3  UNIX System Implementations / UNIX系統實現
    2.3.1  UNIX System V Release 4 / SVR4
      2.3.2  4.4  BSD
    2.3.3  FreeBSD
    2.3.4  Linux
    2.3.5  Mac OS X
    2.3.6  Solaris
    2.3.7  Other UNIX Systems / 其他UNIX系統
  2.4  Relationship of Standards and Implementations / 標準和實現的關係
  2.5  Limits / 限制
    2.5.1  ISO C Limits / ISO C限制
    2.5.2  POSIX Limits / POSIX限制
    2.5.3  XSI Limits / XSI限制
    2.5.4  sysconf, pathconf, and fpathconf Functions / 函數sysconf、pathconf和fpathconf
    2.5.5  Indeterminate Runtime Limits / 不確定的運行時限制
  2.6  Options / 選項
  2.7  Feature Test Macros / 功能測試宏
  2.8  Primitive System Data Types / 基本系統數據類型
  2.9  Differences Between Standards / 標準之間的衝突
  2.10  Summary / 小結
  Exercises  / 習題
Chapter  3. File I/O / 文件I/O
  3.1  Introduction / 引言
  3.2  File Descriptors / 文件描述符
  3.3  open and openat Functions / 函數open和openat
  3.4  creat Function / 函數creat
  3.5  close Function / 函數close
  3.6  lseek Function / 函數lseek
  3.7  read Function / 函數read

  3.8  write Function / 函數write
  3.9  I/O Efficiency / I/O的效率
  3.10  File Sharing / 文件共享
  3.11  Atomic Operations / 原子操作
  3.12  dup and dup2 Functions / 函數dup和dup2
  3.13  sync, fsync, and fdatasync Functions / 函數sync、fsync和fdatasync
  3.14  fcntl Function / 函數fcntl
  3.15  ioctl Function / 函數ioctl
  3.16  /dev/fd
  3.17  Summary / 小結
  Exercises  / 習題
Chapter  4. Files and Directories / 文件和目錄
  4.1  Introduction / 引言
  4.2  stat, fstat, fstatat, and lstat Functions / 函數stat、fstat、fstatat和lstat
  4.3  File Types / 文件類型
  4.4  Set-User-ID and Set-Group-ID / 設置用戶ID和設置組ID
  4.5  File Access Permissions / 文件訪問許可權
  4.6  Ownership of New Files and Directories / 新文件和目錄的所有權
  4.7  access and faccessat Functions / 函數access和faccessat
  4.8  umask Function / 函數umask
  4.9  chmod, fchmod, and fchmodat Functions / 函數chmod、fchmod和fchmodat
  4.10  Sticky Bit / 粘著位
  4.11  chown, fchown, fchownat, and lchown Functions / 函數chown、fchown、fchownat和lchown
  4.12  File Size / 文件長度
  4.13  File Truncation / 文件截斷
  4.14  File Systems / 文件系統
  4.15  link, linkat, unlink, unlinkat, and remove Functions / 函數link、linkat、unlink、unlinkat和remove
  4.16  rename and renameat Functions / 函數rename和renameat
  4.17  Symbolic Links / 符號鏈接
  4.18  Creating and Reading Symbolic Links / 創建和讀取符號鏈接
  4.19  File Times / 文件的時間
  4.20  futimens, utimensat, and utimes Functions / 函數futimens、utimensat和utimes
  4.21  mkdir, mkdirat, and rmdir Functions / 函數mkdir、mkdirat和rmdir
  4.22  Reading Directories / 讀目錄
  4.23  chdir, fchdir, and getcwd Functions / 函數chdir、fchdir和getcwd
  4.24  Device Special Files / 設備特殊文件
  4.25  Summary of File Access Permission Bits / 文件訪問許可權位小結
  4.26  Summary / 小結
  Exercises  / 習題
Chapter  5. Standard I/O Library / 標準I/O庫
  5.1  Introduction / 引言
  5.2  Streams and FILE Objects / 流和FILE對象
  5.3  Standard Input, Standard Output, and Standard Error / 標準輸入、標準輸出和標準錯誤
  5.4  Buffering / 緩衝
  5.5  Opening a Stream / 打開流
  5.6  Reading and Writing a Stream / 讀和寫流
  5.7  Line-at-a-Time I/O / 每次一行I/O
  5.8  Standard I/O Efficiency / 標準I/O的效率
  5.9  Binary I/O / 二進位I/O
  5.10  Positioning a Stream / 定位流

  5.11  Formatted I/O / 格式化I/O
  5.12  Implementation Details / 實現細節
  5.13  Temporary Files / 臨時文件
  5.14  Memory Streams / 內存流
  5.15  Alternatives to Standard I/O / 標準I/O的替代軟體
  5.16  Summary / 小結
  Exercises  / 習題
Chapter  6. System Data Files and Information / 系統數據文件和信息
  6.1  Introduction / 引言
  6.2  Password File / 口令文件
  6.3  Shadow Passwords / 陰影口令
  6.4  Group File / 組文件
  6.5  Supplementary Group IDs / 附屬組ID
  6.6  Implementation Differences / 實現區別
  6.7  Other Data Files / 其他數據文件
  6.8  Login Accounting / 登錄賬戶記錄
  6.9  System Identification / 系統標識
  6.10  Time and Date Routines / 時間和日期常式
  6.11  Summary / 小結
  Exercises  / 習題
Chapter  7. Process Environment / 進程環境
  7.1  Introduction / 引言
  7.2  main Function / main函數
  7.3  Process Termination / 進程終止
  7.4  Command-Line Arguments / 命令行參數
  7.5  Environment List / 環境表
  7.6  Memory Layout of a C Program / C程序的存儲空間布局
  7.7  Shared Libraries / 共享庫
  7.8  Memory Allocation / 存儲空間分配
  7.9  Environment Variables / 環境變數
  7.10  setjmp and longjmp Functions / 函數setjmp和longjmp
  7.11  getrlimit and setrlimit Functions / 函數getrlimit和setrlimit
  7.12  Summary / 小結
  Exercises  / 習題
Chapter  8. Process Control / 進程式控制制
  8.1  Introduction / 引言
  8.2  Process Identifiers / 進程標識
  8.3  fork Function / 函數fork
  8.4  vfork Function / 函數vfork
  8.5  exit Functions / 函數exit
  8.6  wait and waitpid Functions / 函數wait和waitpid
  8.7  waitid Function / 函數waitid
  8.8  wait3 and wait4 Functions / 函數wait3和wait4
  8.9  Race Conditions / 競爭條件
  8.10  exec Functions / 函數exec
  8.11  Changing User IDs and Group IDs / 更改用戶ID和更改組ID
  8.12  Interpreter Files / 解釋器文件
  8.13  system Function / 函數system
  8.14  Process Accounting / 進程會計
  8.15  User Identification / 用戶標識

  8.16  Process Scheduling / 進程調度
  8.17  Process Times / 進程時間
  8.18  Summary / 小結
  Exercises  / 習題
Chapter  9. Process Relationships / 進程關係
  9.1  Introduction / 引言
  9.2  Terminal Logins / 終端登錄
  9.3  Network Logins / 網路登錄
  9.4  Process Groups / 進程組
  9.5  Sessions / 會話
  9.6  Controlling Terminal / 控制終端
  9.7  tcgetpgrp, tcsetpgrp, and tcgetsid Functions / 函數tcgetpgrp、tcsetpgrp和tcgetsid
  9.8  Job Control / 作業控制
  9.9  Shell Execution of Programs / Shell執行程序
  9.10  Orphaned Process Groups / 孤兒進程組
  9.11  FreeBSD Implementation / FreeBSD實現
  9.12  Summary / 小結
  Exercises  / 習題
Chapter  10. Signals / 信號
  10.1  Introduction / 引言
  10.2  Signal Concepts / 信號概念
  10.3  signal Function / 函數signal
  10.4  Unreliable Signals / 不可靠的信號
  10.5  Interrupted System Calls / 中斷的系統調用
  10.6  Reentrant Functions / 可重入函數
  10.7  SIGCLD Semantics / SIGCLD語義
  10.8  Reliable-Signal Terminology and Semantics / 可靠信號術語和語義
  10.9  kill and raise Functions / 函數kill和raise
  10.10  alarm and pause Functions / 函數alarm和pause
  10.11  Signal Sets / 信號集
  10.12  sigprocmask Function / 函數sigprocmask
  10.13  sigpending Function / 函數sigpending
  10.14  sigaction Function / 函數sigaction
  10.15  sigsetjmp and siglongjmp Functions / 函數sigsetjmp和siglongjmp
  10.16  sigsuspend Function / 函數sigsuspend
  10.17  abort Function / 函數abort
  10.18  system Function / 函數system
  10.19  sleep, nanosleep, and clock_nanosleep Functions / 函數sleep、nanosleep和clock_nanosleep
  10.20  sigqueue Function / 函數sigqueue
  10.21  Job-Control Signals / 作業控制信號
  10.22  Signal Names and Numbers / 信號名和編號
  10.23  Summary / 小結
  Exercises  / 習題
Chapter  11. Threads / 線程
  11.1  Introduction / 引言
  11.2  Thread Concepts / 線程概念
  11.3  Thread Identification / 線程標識
  11.4  Thread Creation / 線程創建
  11.5  Thread Termination / 線程終止
  11.6  Thread Synchronization / 線程同步

    11.6.1  Mutexes / 互斥量
    11.6.2  Deadlock Avoidance / 避免死鎖
    11.6.3  pthread_mutex_timedlock Function / 函數pthread_mutex_timedlock
    11.6.4  Reader-Writer Locks / 讀寫鎖
    11.6.5  Reader-Writer Locking with Timeouts / 帶有超時的讀寫鎖
    11.6.6  Condition Variables / 條件變數
    11.6.7  Spin Locks / 自旋鎖
    11.6.8  Barriers / 屏障
  11.7  Summary / 小結
  Exercises  / 習題
Chapter  12. Thread Control / 線程式控制制
  12.1  Introduction / 引言
  12.2  Thread Limits / 線程限制
  12.3  Thread Attributes / 線程屬性
  12.4  Synchronization Attributes / 同步屬性
    12.4.1  Mutex Attributes / 互斥量屬性
    12.4.2  Reader-Writer Lock Attributes / 讀寫鎖屬性
    12.4.3  Condition Variable Attributes / 條件變數屬性
    12.4.4  Barrier Attributes / 屏障屬性
  12.5  Reentrancy / 重入
  12.6  Thread-Specific Data / 線程特定數據
  12.7  Cancel Options / 取消選項
  12.8  Threads and Signals / 線程和信號
  12.9  Threads and fork / 線程和fork
  12.10  Threads and I/O / 線程和I/O
  12.11  Summary / 小結
  Exercises  / 習題
Chapter  13. Daemon Processes / 守護進程
  13.1  Introduction / 引言
  13.2  Daemon Characteristics / 守護進程的特徵
  13.3  Coding Rules / 編程規則
  13.4  Error Logging / 出錯記錄
  13.5  Single-Instance Daemons / 單實例守護進程
  13.6  Daemon Conventions / 守護進程的慣例
  13.7  Client-Server Model / 客戶進程-伺服器進程模型
  13.8  Summary / 小結
  Exercises  / 習題
Chapter  14. Advanced I/O / 高級I/O
  14.1  Introduction / 引言
  14.2  Nonblocking I/O / 非阻塞I/O
  14.3  Record Locking / 記錄鎖
  14.4  I/O Multiplexing / I/O多路轉接
    14.4.1  select and pselect Functions / 函數select和pselect
    14.4.2  poll Function / 函數poll
  14.5  Asynchronous I/O / 非同步I/O
    14.5.1  System V Asynchronous I/O / System V非同步I/O
    14.5.2  BSD Asynchronous I/O / BSD非同步I/O
    14.5.3  POSIX Asynchronous I/O / POSIX非同步I/O
  14.6  readv and writev Functions / 函數readv和writev
  14.7  readn and writen Functions / 函數readn和writen

  14.8  Memory-Mapped I/O / 存儲映射I/O
  14.9  Summary / 小結
  Exercises  / 習題
Chapter  15. Interprocess Communication / 進程間通信
  15.1  Introduction / 引言
  15.2  Pipes / 管道
  15.3  popen and pclose Functions / 函數popen和pclose
  15.4  Coprocesses / 協同進程
  15.5  FIFOs
  15.6  XSI IPC
    15.6.1  Identifiers and Keys / 標識符和鍵
    15.6.2  Permission Structure / 許可權結構
    15.6.3  Configuration Limits / 結構限制
    15.6.4  Advantages and Disadvantages / 優點和缺點
  15.7  Message Queues / 消息隊列
  15.8  Semaphores / 信號量
  15.9  Shared Memory / 共享存儲
  15.10  POSIX Semaphores / POSIX信號量
  15.11  Client-Server Properties / 客戶進程-伺服器進程屬性
  15.12  Summary / 小結
  Exercises  / 習題
Chapter  16. Network IPC: Sockets / 網路IPC:套接字
  16.1  Introduction / 引言
  16.2  Socket Descriptors / 套接字描述符
  16.3  Addressing / 定址
    16.3.1  Byte Ordering / 位元組序
    16.3.2  Address Formats / 地址格式
    16.3.3  Address Lookup / 地址查詢
    16.3.4  Associating Addresses with Sockets / 將套接字與地址關聯
  16.4  Connection Establishment / 建立連接
  16.5  Data Transfer / 數據傳輸
  16.6  Socket Options / 套接字選項
  16.7  Out-of-Band Data / 帶外數據
  16.8  Nonblocking and Asynchronous I/O / 非阻塞和非同步I/O
  16.9  Summary / 小結
  Exercises  / 習題
Chapter  17. Advanced IPC / 高級進程間通信
  17.1  Introduction / 引言
  17.2  UNIX Domain Sockets / UNIX域套接字
  17.3  Unique Connections / 唯一連接
  17.4  Passing File Descriptors / 傳送文件描述符
  17.5  An Open Server, Version 1 / 打開伺服器進程第 1版
  17.6  An Open Server, Version 2 / 打開伺服器進程第 2版
  17.7  Summary / 小結
  Exercises  / 習題
Chapter  18. Terminal I/O / 終端I/O
  18.1  Introduction / 引言
  18.2  Overview / 概述
  18.3  Special Input Characters / 特殊輸入字元
  18.4  Getting and Setting Terminal Attributes / 獲得和設置終端屬性

  18.5  Terminal Option Flags / 終端選項標誌
  18.6  stty Command / stty命令
  18.7  Baud Rate Functions / 波特率函數
  18.8  Line Control Functions / 行控制函數
  18.9  Terminal Identification / 終端標識
  18.10  Canonical Mode / 規範模式
  18.11  Noncanonical Mode / 非規範模式
  18.12  Terminal Window Size / 終端窗口大小
  18.13  termcap, terminfo, and curses / termcap、terminfo和curses
  18.14  Summary / 小結
  Exercises  / 習題
Chapter  19. Pseudo Terminals / 偽終端
  19.1  Introduction / 引言
  19.2  Overview / 概述
  19.3  Opening Pseudo-Terminal Devices / 打開偽終端設備
  19.4  pty_fork Function / 函數pty_fork
  19.5  pty Program / pty程序
  19.6  Using the pty Program / 使用pty程序
  19.7  Advanced Features / 高級特性
  19.8  Summary / 小結
  Exercises  / 習題
Chapter  20. A Database Library / 資料庫函數庫
  20.1  Introduction / 引言
  20.2  History / 歷史
  20.3  The Library / 函數庫
  20.4  Implementation Overview / 實現概述
  20.5  Centralized or Decentralized / 集中式還是非集中式
  20.6  Concurrency / 併發
  20.7  Building the Library / 構造函數庫
  20.8  Source Code / 源代碼
  20.9  Performance / 性能
  20.10  Summary / 小結
  Exercises  / 習題
Chapter  21. Communicating with a Network Printer / 與網路印表機通信
  21.1  Introduction / 引言
  21.2  The Internet Printing Protocol / 網路列印協議
  21.3  The Hypertext Transfer Protocol / 超文本傳輸協議HTTP
  21.4  Printer Spooling / 列印假離線技術
  21.5  Source Code / 源代碼
  21.6  Summary / 小結
  Exercises  / 習題
Appendix  A. Function Prototypes / 函數原型
Appendix  B. Miscellaneous Source Code / 其他源代碼
  B.1  Our Header File / 本書使用的頭文件
  B.2  Standard Error Routines / 標準出錯常式
Appendix  C. Solutions to Selected Exercises / 部分習題答案
Bibliography  / 參考書目

  • 商品搜索:
  • | 高級搜索
首頁新手上路客服中心關於我們聯絡我們Top↑
Copyrightc 1999~2008 美商天龍國際圖書股份有限公司 臺灣分公司. All rights reserved.
營業地址:臺北市中正區重慶南路一段103號1F 105號1F-2F
讀者服務部電話:02-2381-2033 02-2381-1863 時間:週一-週五 10:00-17:00
 服務信箱:bookuu@69book.com 客戶、意見信箱:cs@69book.com
ICP證:浙B2-20060032