UNIX环境高级编程第二版勘误errata

http://www.apuebook.com/errata2e.html

Welcome to the web site dedicated to the support of the second edition of Advanced Programming in the UNIX? Environment.

The following errors were fixed in the second printing.

  1. Page 413, third paragraph. If a signal is related to an expiring timer, it is sent to an arbitrary thread, not necessarily to the thread that scheduled the timer. Hardware-related signals are usually delivered to the thread generating the fault (FreeBSD 5.2.1 seems to depart from this is some cases, however). Look here for some test programs that illustrate the behavior of signals with multithreaded processes.

  2. Page 67, sentence before Section 3.7. The size is 2GB, not 2TB.
  3. Page 523, Figure 15.26. The largest message we can send on FreeBSD 5.2.1 is 2048 bytes. The kernel limits this value to the maximum size in bytes allowed on a queue.
  4. Page 367, Figure 11.6. pthread_cancel_push should be pthread_cleanup_push.
  5. Page 382, last sentence on page. pthread_mutex_destroy should be pthread_cond_destroy.
  6. Page 357, function prototype for pthread_create. The argument for the start routine is a void *, not a void.
  7. Page 158, near bottom of page. tempfile should be tmpfile.
  8. Page 853, solution to exercise 1.3. ptr should be msg to make it consistent with the function prototype for perror shown earlier in the book.

The following errors were fixed in the third printing.

  1. Page 194, function prototypes for setenv and unsetenv. These functions return -1 on error, which is more specific than simply a nonzero return value.

  2. Page 306, Figure 10.4. The Corrigenda for the Single UNIX Specification added abort and sockatmark to the list of reentrant functions.
  3. Page 361, middle of page. The discussion of pthread_join has been cleaned up, making it clear which thread is placed in the detached state and that it is implementation-specific whether this function fails.
  4. Page 365, Example at end of page. "nonzero" should be "zero."
  5. Page 367, middle of page. The behavior of implementations varies concerning whether cleanup handlers are called if a thread returns from its start routine.
  6. Page 367, end of page. pthread_join for a detached thread might not fail in some implementations, so change "will" to "can."
  7. Page 374, middle of page. fh[idx] = fp->f_next should be fh[idx] = fp. Actually, I should apologize for this one. I‘ve written this logic (correctly) so many times that I have no good excuse for getting it wrong this time. Same problem occurs again near the top of page 377.
  8. Page 374, end of page. In the statement idx = HASH(fp) at the beginning of foo_find, fp is undefined at this point. The correct thing to do is to search every hash chain to find a matching ID. Same problem occurs again in the middle of page 377.
  9. Page 391, function prototype for pthread_attr_setstack. Remove the const type qualifier.
  10. Pages 414-415, Figure 12.16. Change the variable wait to waitloc to allow compilation on some platforms.
  11. Page 599, Figure 17.16. The variable len should be declared to be of type socklen_t.
  12. Pages 849 and 851 (Figures B.3 and B.4). The snprintf and vsnprintf calls should specify one byte less than the size of the buffer to prevent overwriting the byte after the end of the buffer with a newline.

Here are the errors fixed in the fifth printing:

  1. Page 255, top of page. ac_flag should be ac_stat.

  2. Page 14, first paragraph. The statement that all threads in a process share the same stacks is a little misleading: each thread executes on its own stack, although any thread can access the stack of the other threads in the process, because the address space is shared among the threads.
  3. Page 701, last paragraph. Figure 15.8 should be Figure 15.19.

时间: 2024-12-15 03:32:10

UNIX环境高级编程第二版勘误errata的相关文章

Unix环境高级编程

Advanced Programming in the UNIX Environment Second Edition Unix 环境高级编程 第二版 目录: 第一章:UNIX基础知识 第二章:UNIX标准化及实现 第三章:文件I/O 第四章:文件和目录 第五章:标准I/O库 第六章:系统数据文件盒信息 第七章:进程环境 第八章:进程控制 第九章:进程关系 第十章:信号 第十一章:线程 第十二章:线程控制 第十三章:守护线程 第十四章:高级I/O 第十五章:进程间通信 第十六章:网络IPC:套接

《UNIX环境高级编程》第二版源码在Ubuntu下的编译

涂鸦一文,自娱娱乐. 无题 草舍如沙天地卷,且放白鹿青崖间.   望闻问切麻雀全,漫卷诗书彩云乡.   天地琴心天地曲,天际行将遥望远.   大浪淘沙鲁智深,乱云飞渡仍从容. <UNIX环境高级编程>第二版源码在Ubuntu下的编译

unix环境高级编程编译方法 -apue最简单编译方法(第二版)

<UNIX环境高级编程>(这里使用的是第二版本的源码)每个历程中,都会有这样一行源码: #include "apue.h" 这个头文件是作者把把每个例程中常用的标准头文件,一些常用的出错处理函数(err_**()之类的函 数)和一些常用的宏定义给整理在一个头文件中.这个可以省去在每个例程中录入较多的重复代码,这样可 以减少每个例程的长度.给读者带来了不少麻烦.下面给出一种源代码的编译方法. 1.解压文件到apue.2e目录 2.修改相应平台的文件,我使用的是linux,所以

Linux - Unix环境高级编程(第三版) 代码编译

Unix环境高级编程(第三版) 代码编译 本文地址:http://blog.csdn.net/caroline_wendy 时间:2014.10.2 1. 下载代码:http://www.apuebook.com/code3e.html 2. 安装依赖库:sudo apt-get install libbsd-dev  3. 进入下载目录make 4. 复制头文件和动态链接库 sudo cp ./include/apue.h /usr/include/ sudo cp ./lib/libapue

OS X下UNIX环境高级编程(第三版)学习日志-第一章ChapterI,编译apue包与第一个例程

1.从网络上获取代码,地址如下apue最新官方下载地址 2.解压到本地 由于最新版本是第三版(3rd Edition),apue.3e,就是我们要的源代码 3.编译源代码 编译过程中笔者并未遇到任何问题,所以建议大家也下载最新版本的代码来学习,贴一下笔者的环境信息 Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple

【转】apue《UNIX环境高级编程第三版》第一章答案详解

原文网址:http://blog.csdn.net/hubbybob1/article/details/40859835 大家好,从这周开始学习apue<UNIX环境高级编程第三版>,在此,我要感谢网易的一个工程师朋友和室友,没有他们,我不会开始真正的学习这本书,希望大家以后开始慢慢进步.废话少说,直接上课后习题了. UNIX高级编程第一章习题答案: 1.1在系统上验证,除根目录外,目录l和l l是不同的. 答:这个验证有很多方法可使用命令ls .cd.vim等,目录.指向当前目录,目录..指

《UNIX环境高级编程(第3版)》

<UNIX环境高级编程(第3版)> 基本信息 原书名:Advanced Programming in the UNIX Environment (3rd Edition) (Addison-Wesley Professional Computing Series) 原出版社: Addison-Wesley Professional 作者: (美)W. Richard Stevens    Stephen A. Rago 译者: 戚正伟 张亚英 尤晋元 出版社:人民邮电出版社 ISBN:9787

unix环境高级编程(第三版)中apue.h文件的配置问题

最近刚开始学习unix环境高级编程(第三版),其中有个作者自己写的apue.h文件,在这归总下相应的配置方法,希望对有需要的朋友们有所帮助 首先http://www.apuebook.com/code3e.html 上去下载相应的压缩包,注意自己书的版本. 下载完成之后,鉴于大多数朋友学习linux都是基于虚拟机的,所以顺便附上虚拟机与本地主机传输文件的方式 首先下载SSH Secure Shell 这个工具,然后直接点击quick connect, 弹出如下界面,输入虚拟机的ip地址,和登录用

UNIX环境高级编程(第三版)关于apue.h的用法

UNIX环境高级编程(第三版)中的例子用到apue.h这个头文件,但是书里面写的地址已经不能访问. 经过一番查找之后,找到如下解决方案: 1.到www.apuebook.com上下载第2版的源码,也可以直接点这里. 2.下载后的源码,需要修改一下: 1.Make.defines.linux中第6行WKDIR=/home/sar/apue.2e更改为目录的绝对路径. 2.apue.2e/ipp/ipp.h中第122行中的status换为Status.(也可换为其他,但要与下面对应) 3.apue.