The Unix landscape has changed beyond all recognition in the years since the first edition of this book appeared. In recognition of that fact Marc Rochkind has pretty much completely re-written his classic 'Advanced Unix Programming'. So don't be fooled by the fact that it's tagged as a 'second edition', this is effectively a new book with the same title. The Unix world is a lot more complicated now, both in terms of flavours (think Linux, BSD, Solaris, Mac OS X and so on), and also in terms of the sheer size of the kernel - the author states that the first edition covered around 70 system calls, this one covers more than 300.
The book aims to provide the competent C programmer a useful guide to the most important Unix system calls, across many of the different Unix-family platforms. This is a fairly ambitious undertaking and one that the author tackles by making extensive use of macro code. While this means the code is largely uncluttered, (and so, consequently, is the book), it does mean that anyone focused entirely on one platform might miss some of the subtleties that the macros hide. That isn't to say that platform differences aren't discussed, they are, it's just that the use of macros hides considerable complexity. However, without the use of macros it's certain that the code would have been a nightmare. Of course it helps that Rochkind explains why he's coded the way he has and makes the code available for download.
The book opens with a quick survey of the lay of the land, particularly in respect of POSIX and other standards, versions of Unix and coverage of the vexed topic of error handling (and the aforementioned macros). From then on it's straight into the core material - how to program Unix using system calls.
With so much material to cover the book looks at eight specific topics: File I/O, Advanced I/O, Terminal I/O, Processes and Threads, Basic Interprocess Communication, Advanced Interprocess Communication, Networking and Sockets and Signals and Timers. That's a lot of material to cover in one book, and Rochkind does a good job of it. The writing is to the point without being unnecessarily terse, and there are plenty of useful asides, anecdotes and snippets that add to the value of the book. While there's no in-depth knowledge of Unix assumed there is an assumption that the reader understands C programming. In that sense it's not a book that can be recommended to the beginning C hacker. [Continued]