------------------------------------------------------------------------ Typos and errors found in "Advanced Programming in the UNIX Environment" (Last updated March 3, 1994) - p. 422: Half way down page: "of the facility shown in {syslog_facility}" should be "of the facility shown in Figure 13.4". The following errors are corrected in the 6th printing and later (check the last line on the copyright page to determine the printing). ------------------------------------------------------------------------- - p. 26: Second sentence of 2.2.2: "POSIX stands for Portable Operating System Interface." (Omit "for Computer Environments".) - p. 65: Fifth line on the page: "The following three commands ..." should be "The following four commands ..." - p. 146: Fifth line of second bullet item: the second lowercase z in the character set [a-zA-z0-9./] should be an uppercase Z. - p. 307: The declaration for TELL_WAIT() should be TELL_WAIT(void). - p. 331: In Figure 11.6, the typical values for START and STOP are flipped: START should be ^Q and STOP should be ^S. - p. 408: In the functions writen() and readn() the variables nwritten and nread should both be ssize_t, not size_t, since both can be negative. - p. 434: The declaration for TELL_WAIT() should be TELL_WAIT(void). - p. 493: The final argument to request() in Program 15.15 should be STDOUT_FILENO, not STDIN_FILENO. (Notice that both descriptors refer to the same full-duplex stream pipe, so the code works, but for aesthetic reasons we shouldn't write to standard input.) - p. 494: The four references to STDOUT_FILENO in Program 15.16 should be using the "fd" argument instead (which will be STDOUT_FILENO, from the previous typo). - p. 579: Fifth line in Section 18.1: "while Berkeley systems calls it tip" should be "while Berkeley systems call it tip". - p. 584: Second line after list item 4 (just over halfway down the page): "the Devices file is already is use": "is use" should be "in use". - p. 598: One-third of the way down the page, the line log_sys("calloc error") should be log_sys("malloc error"). - p. 606: In the 7th line of the comment at the top of the page, childptr->parity should be cliptr->parity. - p. 606: Third line of code from the bottom: the call to log_sys() should be log_sys("writen error"); - p. 611: The call to sprintf() at the bottom of the page should be: sprintf(errmsg, "unknown send escape char: \\%s\n", - p. 628: Third line of code from the bottom: the comment "but newlines are written to the file" is wrong. Change the comment to "increment and display line counter". - p. 733: Index entries for "Portable ..." and "POSIX": same change as for p. 26. The following errors are corrected in the 5th printing and later (check the last line on the copyright page to determine the printing). ------------------------------------------------------------------------- - p. 12: In the function prototype for write, 7 lines from the bottom of the page, the second argument should be a constant pointer: ssize_t write(int, const void *, size_t); - p. 31: The first sentence of the final paragraph should read "the minimum number of standard I/O streams that the implementation guarantees can be open at once". (This is a clarification, not a typo.) - p. 99: Towards the end of first paragraph of Section 4.16: "can create a symbolic links" should be "can create a symbolic link". - p. 107: In the function prototype for readdir(), it returns NULL "at end of directory or error". - p. 146: Third last line of second bullet item: "used ID" should be "user ID". - p. 167: Second bullet item from the bottom (Uninitialized data segment): "initialized by the kernel to 0" should really be "initialized by the kernel to arithmetic 0 or null pointers". - p. 180: In the call to setvbuf() in Program 7.6, the final two arguments are swapped: should be setvbuf(fp, databuf, _IOLBF, BUFSIZ). - p. 201: First sentence after "Example": the reference to Section 8.3 should be to Section 8.5. - p. 205: Second line on page: reference to Section 15.2 should be to Program 14.3. - p. 238: 4th sentence from top of page: "These parameters specify the baud rate of the terminal, for example" should be "One parameter is the baud rate of the terminal, for example." (Rewording for clarity.) - p. 244: 7th line above "9.5 Sessions": "that is has happened" should be "that this has happened". - p. 248: 4th line from the bottom: "foreground of" should be "foreground or". - p. 270: signal function: returns SIG_ERR on error. - p. 273: 3rd sentence under "Program Start-up": "the exec functions change the status" should be "the exec functions change the disposition". - p. 273: Last sentence on page: "catches only the signal if" should be "catches the signal only if". - p. 298: 3rd line from bottom of page: "these other signal" should be "these other signals". - p. 307: In the two calls to err_sys() at the beginning of TELL_WAIT(), the error messages should refer to SIGUSR1 and SIGUSR2, respectively, not SIGINT and SIGQUIT. - p. 313: 4th line of text: "The catching of this signal in the parent ..." should be replaced with "The delivery of this signal in the parent ...". - p. 323: Exercise 10.3 should refer to Program 10.6, not 10.5. - p. 346: Label for Program 11.3: "termid" should be "ctermid". - p. 373: The 3rd line of output at the top of the page "child: fcntl error ..." should read "child: writew_lock error ...". - p. 378: First line following Figure 12.6, "file (every" should be "file locking (every". - p. 410: 3rd line of MAP_SHARED: "that is, as store" should be "that is, "a store". - p. 481: In the 5th line of the 2nd paragraph, "(1-255)" should be "(1 through 255)" to reiterate this is a range, not subtraction. - p. 490: Item 1 after second paragraph: "similar to a library function" should be "similar to the client calling a library function". (This is a rewording for clarity, not a typo.) - p. 511: The variable "n" in the function loop() is not needed. - p. 512: Storing the results of the poll() call into the variable "n" is not needed, since it's never used. - p. 512: The call to err_sys() after the poll() should say "poll error", not "select error". - p. 521: 6th line from the top: "to the called" should be "to the caller". - p. 528: First sentence after Program 16.4: "The size of the index buffer" should be "The sizes of the ...". - p. 533: In the call to err_dump() halfway down the page, it should say "read error of index record" (not "indexc record"). - p. 545: In the 3rd line of the comment at the top of the page, "this is function" should be "this function". - p. 547: The first sentence of "Single-Process Results": the 100 should be 1000. - p. 560: First sentence after Program 17.3: "many of which can be ignored" "should be "most of which can be ignored". (Rewording) - p. 623: 3rd line of comment at top of page: "charcter" should be "character". - p. 670: Function prototype for readdir(): same fix as on p. 107. - p. 695: Last line of answer to 5.6: "still be in" should be "still in". - p. 715: The SFIO package (Korn & Vo) is now freely available from AT&T: echo 'send attgifts/sfio.shar' | mail netlib@research.att.com - p. 738: Add page number 270 to the entry for SIG_ERR. The following errors are corrected in the 2nd printing and later (check the last line on the copyright page to determine the printing). ------------------------------------------------------------------------- - p. 31: Last sentence of third from bottom paragraph should read "we would have CHAR_MIN equal to 0 and ...". (UCHAR_MIN does not exist.) - p. 55: Next to last sentence in Section 3.7: "signed size_t" should be "unsigned size_t". - p. 119: Exercise 4.19: "is path is" should be "if path is". - p. 124: Last sentence of indented paragraph above Figure 5.1: "st_blksiz" should be "st_blksize". - p. 125: Indented paragraph at end of Section 5.4: "Non-ASNI" should be "Non-ANSI". - p. 139: Next to last sentence on page: "st_blksiz" should be "st_blksize". - p. 143: The sentence at the top of the page: "One way for the tempnam ..." should be removed, since access() uses the real user and group IDs and the test may not work right from a set-user-ID program. - p. 200: Last sentence in Figure 8.3: "The macro determines if" should be "The WIFSTOPPED macro determines if". - p. 224: Last line on page: "each command-line argument" should be "its command-line argument". - p. 225: In the heading for Program 8.14 change "each command-line argument" to "the command-line argument". - p. 240: The first sentence on the page should start: "login really does more than we've described here" (not init). - p. 250: Halfway down the page: "Doing this causes the shell to place the job into the foreground process group (setpgid)"; replace setpgid with tcsetpgrp. - p. 273: Second paragraph under "Program Start-up": "With any of the shells" should be "With a non-job-control shell". - p. 279: Second paragraph: Change "Note also that longjmp and siglongjmp are not in Figure 10.3" to "POSIX.1 does not include longjmp and siglongjmp in Figure 10.3". - p. 281: Third indented paragraph at the top of the page: "either signal of sigset" should be "either signal or sigset". - p. 342: For PARMRK, add the sentence "If ISTRIP is not set, a valid \377 is passed to the process as \377, \377. - p. 550: Exercise 16.2: "that is was reading" should be "that it was reading". - p. 561: Remove the opening paren in the C comment at the top of the page. - p. 595: The "usage:" message generated at the beginning of the function should say "usage: call ". - p. 623: The second line after the #ifdef VSUSP should be a call to tty_reset(STDIN_FILENO) and not to tty_cbreak(STDIN_FILENO). - p. 719: The reference to page 143 for "access" should be removed. - p. 728: Add a reference to page 342 for ISTRIP. - p. 737: Remove the reference to page 250 for setpgid. - p. 741: Add a reference to page 250 for tcsetpgrp. - p. 742: The reference to p. 623 for tty_cbreak should be removed and a reference to p. 623 should be added for tty_reset. - p. 742: The reference to UCHAR_MIN should be deleted.