Advanced Programming in the UNIX(R) Environment (2nd Edition) (Addison-Wesley Professional Computing Series) Reviews



Amazon.com Customer Reviews

Classic piece of work kept up to date! - Review written on July 11, 2006
* * * * *
Rating: 5 out of 5
4 customers found this review helpful.

The book evolved from its first edition and its definitely a mammoth task trying to keep in this edition what is relevant and what isn't but i think the authors did it :)

If you want to be a UNIX Guru, then this is definitely the book for you :)
Very detailed, but well indexed reference - Review written on February 28, 2006
* * * * *
Rating: 5 out of 5
1 customer found this review helpful, 3 did not.

Everything you wanted to know (and probably didn't care to know) about linux.
The only drawback are some of the builtin functions that he uses. These are usually uppercase modifications of the lower case functions. It creates one more step for the reader, if they don't want to use his builtin functions.
Outstanding second edition of a computing classic - Review written on December 02, 2005
* * * * *
Rating: 5 out of 5
24 customers found this review helpful.

This badly needed update to the classic first edition preserves what is best about the old edition, which is the format and attention to detail, and adds the changes that have occurred to the UNIX operating system since the first edition was published back in 1992. Specifically, there are implementation samples for FreeBSD, Linus, and MAC OS X included. This edition is as the first one was, an excellent reference for anyone doing system level programming in C or C++ on the UNIX platform. It is was never intended to teach the reader the fundamentals of the UNIX environment nor to teach C/C++ programming. The author assumes a strong knowledge of both. The book begins much as the first edition did, by explaining the UNIX kernel in generic terms. It then goes on to explain the various implementations of UNIX and their specific differences. You will find chapters three through ten largely unchanged from the first edition, as the basic mechanisms of file I/O, directory structure, interprocess control, and signaling have not evolved since that time. Chapters eleven and twelve are two new added chapters on threads, as threading has become very important in UNIX system programming. Also, gone is the chapter on interfacing to a postscript printer. It is replaced by a more modern chapter on communicating with a network printer. The HTTP protocol is discussed in this context. The book contains a rich set of examples and downloadable code that is very useful. In addition, the book contains the implementations of two large-scale projects: a database library and communication with a network printer. Each project includes complete code with schematics. This book also contains numerous exercises, and the solutions to some of those exercises are included in the back of the book. Since Amazon, and some reviewers, show the table of contents for the first edition but not the second, I include that here for the purpose of completeness:
1. UNIX System Overview
2. UNIX Standardization and Implementations
3. File I/O
4. Files and Directories
5. Standard I/O Library
6. System Data Files and Information
7. Process Environment
8. Process Control
9. Process Relationships
10. Signals
11. Threads
12. Thread Control
13. Daemon Processes
14. Advanced I/O
15. Interprocess Communication
16. Network IPC: Sockets
17 Advanced IPC
18. Terminal I/O
19. Pseudo Terminals
20. A Database Library
21. Communicating with a Network Printer
Appendix A. Function Prototypes
Appendix B. Miscellaneous Source Code
Appendix C. Solutions to Selected Exercises
A must-have book - Review written on August 12, 2005
* * * * *
Rating: 5 out of 5
7 customers found this review helpful, 2 did not.

It's a must-have book for me. Having a previous edition already available, I've bought the second one - quite a bit of new Unix releases appeared since I've got the first edition, so, time to get up-to-date, especially taking into account Linux and Mac OS details available in a second edition.
Great book: get the 2nd edition - Review written on July 21, 2005
* * * * *
Rating: 5 out of 5
8 customers found this review helpful, 3 did not.

The second edition was published in June 2005. Unless you're a computer historian, get the new one:

(...)
Great book. Marc Rochkind's book is also very good and surprisingly non-overlapping, considering.
Quintupled in size - Review written on July 21, 2005
* * * * *
Rating: 5 out of 5
10 customers found this review helpful, 5 did not.

Is it just me or did this book quintuple in size between the first and second versions. This book is now an almost thousand page hardback tome. But all that extra bulk is not a bad thing in this case. Each sub-system is now covered in amazing detail. The illustrations are fantastic. And the book covers the bevy of Unix variants which makes it extremely valuable. Definitely a must have second edition for any programmer whose primary platform is Unix.
superb update of the first edition - Review written on July 09, 2005
* * * * *
Rating: 5 out of 5
20 customers found this review helpful.

Many of you who learnt unix in the 90s would have cut your teeth on the first edition of this book. This second edition should be well received. It encapsulates the changes in the unix world since 92. Most importantly, it shows the rise of linux. A rise that is still unabated.

Broadly, the structure of this edition matches the first edition. Rago was brought in as co-author after Stevens died in 99, and he has deliberately kept this consistency. I was glad to see that Rago kept the exercises at the end of each chapter. Many computer books seem to dispense with this, which can be a pity for anyone who needs hands on tasks to learn from.

The threading chapters are a significant change from the first edition. Not simple reading, but they do reflect powerful ways to possibly optimise your code. The biggest cost for you may be the effort you need to invest in understanding the coding issues in these chapters. Rago's code examples are deliberately short, and necessarily somewhat artificial. But they do demonstrate well the various threading issues.

Of course, other chapters have had minimal alterations. How much have terminal I/O or pseudoterminals changed in 10 years? Those chapters may be old friends to you.
Classic work - but in series need of updates as time goes on - Review written on May 05, 2005
* * * * *
Rating: 5 out of 5
2 customers found this review helpful, 2 did not.

I cannot fathom a guess as to how many times the books in this series have saved my in project work over the years. The only drawback with this series is that some publisher should endeavor to keep them up to date. Serious Unix system programmers must have copies of the complete series.
A Unix Programmers Bible - Review written on July 07, 2004
* * * * *
Rating: 5 out of 5
4 customers found this review helpful.

This is an essential book for any serious or professional Unix programmer.

Written in a clear paedagogical style, Professor Stevens demonstrates mastery of the subject, and his desire to pass that expertise on to the reader.

The API's are illuminated by clear examples of their use. He also mentions many of the pitfalls to look out for when programming across the different flavours (BSD, SRV4) and different standards (POSIX, ANSI).

It is a comprehensive tome that represents real value for money.

I use this book so much I will probably need to buy another copy in a few years, if it doesn't go on permanent loan first.

Lucid Explanations to understand UNIX ! - Review written on February 01, 2004
* * * * *
Rating: 5 out of 5
1 customer found this review helpful, 1 did not.

This is inarguably the best book you can find to learn UNIX programming. Not only is everything that is required clearly explained with examples, the author goes out of his way to give us pertinent extra information.

Buy it!

"A Reader" from MI rates it one star? - Review written on October 06, 2003
* * * * *
Rating: 5 out of 5
3 customers found this review helpful, 2 did not.

How could anyone objectively rate this incredible text at one star!? Have you read any of it or do you just pick books to "dis"? This book, like all of Steven's books, is fantastic. And I'm not a Unix guru or a C guru.
Great book - Review written on September 11, 2003
* * * * *
Rating: 5 out of 5

The book is invaluable. The topics are covered clearly and deeply, this book is written with the word "teaching" in mind.
If you want to know how Unix works, this is a must-buy.
Lots of clear and useful code are included; the author not only effectively explains, but involves you in reading well-written code to let you comfortably understand also the most advanced aspects of Unix system programming.
Great book - Review written on May 20, 2003
* * * * *
Rating: 5 out of 5
2 customers found this review helpful, 1 did not.

I loved this book. You can open it anywhere and read it from there.
Text is very clear written and examples are just great. I fill like this book and some time :) is all I need to learn UNIX programming.
Highly recomended.
One of Two Must-Have UNIX Books - Review written on March 03, 2003
* * * * *
Rating: 5 out of 5
8 customers found this review helpful.

This is one of two must-have UNIX books ("UNIX Network Programming" and "Advanced Programming for the UNIX Environment"). After I had been using UNIX for a long time and was getting into more advanced UNIX programming about a decade ago, these two books were recommended. I checked around and made comparisons. Sure enough, I had to agree. I bought both of them and use them a lot, even when doing Windows programming.

As an example, I had to reference them again this weekend. I am using Visual Basic and C++ under Windows to connect some UDP/IP communications between applications. Once again, these books were indispensable (even after looking at online help, Google, Microsoft Knowledge Base and Experts-Exchange). Any Internet professional should have both of these books on their shelf.

The ESSENTIAL C Reference - Review written on January 15, 2003
* * * * *
Rating: 5 out of 5
5 customers found this review helpful, 3 did not.

If you are going to program in C, this is THE book to get. Simple as that. It has a comprehensive, logically organized walkthrough of every system call in every UNIX variant of C, and examples of how to use each. There are a host of sample problems and corresonding source code to demonstrate these examples, and an excellent explanation of the function of each element of the C language.

Everything from basic I/O to terminals is covered, which should be enough to write your own operating system if you ever felt the inclination to do so. All the important defined constants are listed out in tables. The book has a very clear structure that makes it easy to find what you want when you want it. There's also an exhaustive index that assists in the reference of more obscure items.

Since C is still used as a 'high-level assembly language,' especially in the development of fast applications like operating systems, this is a necessary reference in the library of any programmer. Accept no substitutes- Stevens' book is the very best.

APUE is the standard for Unix/POSIX API programming - Review written on November 22, 2002
* * * * *
Rating: 5 out of 5
3 customers found this review helpful, 2 did not.

Simply stated, Stevens' _APUE_ is the standard for learning the POSIX APIs for file/directory I/O and operations, processes, signals. (The only thing this book doesn't cover is threads, probably due to the fact that this book came out in 1992.)

Required reading for any aspiring Unix system programmer, this book serves as both a great book for learning as well a reference. I've had this book for close to 10 years, and I still refer to it.

Evrey Unix programmer should have a copy of this book.

SPEECHLESS.... - Review written on August 14, 2002
* * * * *
Rating: 5 out of 5
9 customers found this review helpful, 1 did not.

This is a great..., no, REALLY great book to start Unix Programming. I thought I know C programming quite well, but when I read this book, I realize that I know nothing about Unix.

This book consists of 19 chapters. The first half explains Unix environment that you should aware of when you do programming in Unix. The second (last) half of the book contains 'the advanced Unix programming.' I thought I could skip the first half of this book and go straight to the advanced programming, but then I realised, that if I have never read the basics of Unix programming, then I should read the first half of the book first.

Richard Stevens is so clever to arrange the sequence of the chapters. Each chapter is like a 'linked-list' (if you're a C programmer, you know what I'm talking :) ), in order to understand a certain chapter, you must first understand the preceeding chapter.

If you go to BrainBench.com and check their test syllabus for Unix Programming, this book definitely covers the syllabus. Although I have never taken their test for Unix programming, I think the guys at brainbench are also using this book when developing the test.

If you had other Stevens' book like the famous "Unix Network Programming," (UNP) this book is a must! There's a lot of things I cannot understand when reading UNP until I read this book. But I should warn you: This book is definitely NOT for beginners....

Horrible Book - Review written on July 08, 2002
*
Rating: 1 out of 5
112 customers found this review not to be helpful.
A better choice would be Linux Programming unleashed. This book skims over certain details and is poorly written.
Still an excellent resource - Review written on July 08, 2002
* * * * *
Rating: 5 out of 5
1 customer found this review helpful.

Although it's nearly a decade old, this book is still the best resource for understanding the intricacies of UNIX system calls. It does not cover graphical interfaces or networking; those are topics for other books. Highly recommended for seasoned programmers.
If you want to understand UNIX... - Review written on June 22, 2002
* * * * *
Rating: 5 out of 5
4 customers found this review helpful.

... then this book is probably THE top candidate for helping you to achieve that goal. It's one thing to understand, and be able to exercise, UNIX system administration and maintenance. It's yet another to understand the system calls which allow you to perform the latter. Although both of them rely on each other, it is the latter that I feel is necessary for the most thorough understanding.
Advanced Programming In The UNIX Environment does a MOST EXCELLENT job of lending what is required for both system administrators and programmers alike to work in said environment with a broad realization of what they're working with. Don't let the title scare you --- the word "advanced" in the title should not be equated with "complex." It simply means that, if you choose to learn more, this book will provide it --- it is an exhaustive library of information about both the fundamentals and the subtleties of the UNIX operating environment packed into one book. The author of this book obviously has many years of experience to share, and this book is, by far, _the_ resource to turn to when and if you want a precise and accurate understanding of the topic at hand. I give it ten stars.
not very good - Review written on June 19, 2002
* * *
Rating: 3 out of 5
42 customers found this review not to be helpful.
i think the 2-volume UNP (2nd ed.) is much better.
Very Nice... - Review written on April 24, 2002
* * * * *
Rating: 5 out of 5
1 customer found this review helpful, 2 did not.

Yep. It is very useful. You cannot consider yourself a competent unix developer without this in your library. Though, slightly outdated - I am satisfied. Good ideas, well written commentaries and plenty of code to work with. A Magnus Opus.
The best reference for C programming under Unix Environment - Review written on April 15, 2002
* * * * *
Rating: 5 out of 5
7 customers found this review helpful.

This book is the most complete reference about C programming under Unix Environment. It not only tells you how to use system calls, but also teaches you how the system calls actually works. Although it's written almost a decade ago, all contents are compliant to POSIX 1. So it's still useful to any *n*x operating system that are compliant to POSIX. If you will write programs that run under unix like system, this book is a must have.
An Excellent Unix programming book - Review written on February 07, 2002
* * * * *
Rating: 5 out of 5
1 customer found this review helpful, 2 did not.

This book is the best when it comes to explaining and illustrating the key elements to programming in UNIX. This is a must have for every _good_ programmer.
After 10 years, it is still the best book about UNIX' API - Review written on January 29, 2002
* * * * *
Rating: 5 out of 5
2 customers found this review helpful.

This book is for C programmers. Though there have been many years since it appeared, it is still an invaluable book. The book is full of examples, which is considered as the best way to learn programming language and API.
For an application programmer, it is important to know Unix interfaces clearly and how to use them together. There are a lot of books about Unix, but many of them describe the kernel or other things, and the manual is too large and troublesome to read. So we need the book written by Stevens, which tell you interfaces with examples.
Go and Get it - Review written on January 07, 2002
* * * * *
Rating: 5 out of 5
1 customer found this review helpful.

If you don't have this book, you're not serious about UNIX. It's sufficient to say it's by Stevens. This book is not gonna guide you to the internals of Unix, and will not even lay the ground for that, except maybe if you're curious and you reached the last chapters. However, it's an excellent, unvaluable reference, and book to read if you want to be a good Unix developer. Have not come across any other book that does it as well as Stevens does it.
Good reference in basic Unix API. - Review written on September 26, 2001
* * * *
Rating: 4 out of 5
9 customers found this review helpful, 4 did not.

This book seemed to be magnificent at first as it's big (700 pages), heavy and has a nice cover. And most of the text turned out to be great as well. But there were downsides.

From the first 14-15 chapters it seems like this is one of the best API references I saw. It's not just Unix, it's the way the author writes. He tells you what can be done, how exactly and what to watch for. Typical chapter can look something like:

---

Chapter 93. Cooking Eggs.

Eggs are one of the delicious and nutricious meals. Kitchenware provides the following functions to cook eggs:

egg_t eboil(egg_t egg, time_t time);
egg_t epanfry(egg_t egg, time_t time);
egg_t emicrowave(egg_t egg, time_t time);

All three functions take egg and time to cook and return egg. If time is 0 the egg is cooked until ready. If time is less than 0, it's cooked either for abs(time) or until ready whichever is less. Note, that only superuser can microwave an egg. Historically, these functions were written to operate with kitchen eggs only. Latest versions of Kitchenware add a function yolkctl(egg_t egg, bird_t whose) that you call with eggs before you pass them cooking functions.

Exercises:

1. Microwave an egg. What happened ? Explain why.

---

Well, this is just a few lines, whereas in the book it takes pages and pages of very detailed pedantic explanation. And this was great until approximately chapter 14, when the author started to put more and more sample code inline, in pursue of showing the functional working application or set of functions. This is one of the downsides (to me, if you like to dig through C code rather than reading plain text words - all the better). I think that a book like that should be a reference. The author does not show any algorithms and ideas anyway, so why bothering writing something big ? Give men a bricks and they will build the house themselves.

The other downside is also about the C sample code. As I said - the way Mr. Stevens writes text is very good. And the code is good as well, but not for a sample. In every single sample he is checking every possible error and not simply puts nice little trellis (...) where error handling should be, but actually handles them. Too pedantic and turns half of all the samples into calls to err_output or something. And at the very same time he uses custom header file (ourhdr.h) listed in appendix X, thus making it confusing to catch which is a new function you are reading about, and which is another auxiliary macro from that custom header.

One more thing - the book is basically all about & Co, it does not tell anything about advanced libraries, like regular expressions, Berkeley DB or zlib. I guess that's why there are several more volumes of the same author.

The bottom line is, this book makes a good reference in basic Unix API.

Still a great book (even after 8 years) - Review written on August 22, 2001
* * * *
Rating: 4 out of 5
2 customers found this review helpful, 3 did not.

The author of this book is famous for writing very clear and detailed (two characteristics which usually do not go hand in hand) programming books for the Unix environment. I don't think this book could possibly be more comprehensive at the time that it was written. Code examples are excellent and so are the explanations. Unfortunately, this book is old and only getting older. It was published in 1993, which is ancient history in the computer industry. But don't worry, most of the material in this book is still very useful and practical in today's world. That's why I think that this is still the best Unix programming book you can buy. I would have given this book five stars in 1993. I am lowering the rating to four stars only due to its age.
Helpful writing style; not for "smart beginners" - Review written on July 23, 2001
* * * *
Rating: 4 out of 5
6 customers found this review helpful, 1 did not.

I've discovered through this volume just how popular Stevens' work really is: you can find his examples, even his discussions, reprinted verbatim in more than one professional course on systems interface programming. I won't name names here. :-)

Stevens' writing style is relaxed but focussed. It's easy to follow his points, which is not a short list. The book is 740 pages, the font size is modest, the margins thin. The coverage is comprehensive, making it a useful reference. What I appreciate though is that Stevens didn't slide on too many topics, something references do when the reader is likely to spot-read. It's a well-organized book, full of many well-thought out descriptions and examples.

The reader must bring some C programming and Unix systems experience to appreciate this book; it doesn't complement intuition or mere absorption very well. Intelligent systems programming starts with someone who needs things the operating system can provide, and needs to know how asking for resources changes application and OS behavior. Without some foundation, this book is just a very thick list of some special function calls.

Buy this book only after you're comfortable with your compiler. Otherwise it'll get buried under a mound of installation and release notes, and put back on the shelf when your time runs out. A book like this deserves 2-3 days of study that is unbroken by tracking down tangents you're not familiar with; save your $60 until you have that kind of time and preparation.

The Real Deal - Review written on June 22, 2001
* * * *
Rating: 4 out of 5
3 customers found this review helpful.

This book really helps you get the maximum out of your UNIX-based OS. Has enough information in it to handle some of the finer implementation differences between POSIX and SVR5. Very comprehensive and doesn't waste 3/4 of the book on redundant basics as most books do. Even the final chapter on psuedo terminals -- that could easily be dismissed as high-technical garble -- proved invaluable at my last position!

Maybe the only downside is that this is a book is clearly targeted for the advanced. Beware! I don't know if I'd call this "enjoyable reading".

Definitely a must reference for the bookshelf.

Unix programming bible - Review written on June 08, 2001
* * * * *
Rating: 5 out of 5
2 customers found this review helpful, 5 did not.

Up to now, this is still the ONLY bible about UNIX programming. Even though Stevens is long gone, we will all remember his great work that gives us light while coding on UNIX.
A rarity - a great computer book. - Review written on April 24, 2001
* * * * *
Rating: 5 out of 5
135 customers found this review helpful, 6 did not.

The computer industry is notable for the huge quantity of really bad books it engenders. This, however, is not one of those books - this is a great book. Before explaining why it is great, I'd like to get the table of contents out of the way, so that you will know what it covers:

Preface

1. Introduction (a "whirlwind tour of Unix")

2. Unix Standardization and Implementations

3. File I/O

4. Files and Directories

5. Standard I/O Library

6. System Data Files and Information

7. The Environment of a Unix Process

8. Process Control

9. Process Relationships

10. Signals

11. Terminal I/O

12. Advanced I/O

13. Daemon Processes

14. Interprocess Communication

15. Advanced Interprocess Communication

16. A Database Library

17. Communicating with a PostScript Printer

18. A Modem Dialer

19. Pseudo Terminals

Appendices

A. Function Prototypes

B. Miscellaneous Source Code (all source code is available for download)

C. Solutions to Selected Exercises

Bibliography

Index

The first thing to understand about the book is that while it can be used as just a reference work (the index is wonderful), it really is a book you can and should read. Even if you think you know a lot of this stuff, you can be surprised at what you can still learn.

What makes the book so much more useful than just a collection of man-page print-outs (that dreary and painfully common form of UNIX "book") is the method of presentation. Stevens' basic atom of organization is the function call. For each call (or minor variations on a single call), he provides the C prototype, and then, in text, explains what the function does, what it's arguments are for, and then typically provides a small C program that demonstrates it in action, which he then explains. These function-level building blocks are arranged into related sets, each of which is a chapter in the book. Each chapter has a wrapper that consists of an introduction explaining some basic concepts and history of the functions described in that chapter, and some review exercises at the end. The chapters themselves are arranged so that the earlier chapters describe the basic functions, and the later chapters describe the more difficult functions. Every chapter both teaches the reader something of immediate use in writing code (even the introduction has sample programs), as well as preparing him for the more difficult subjects that lie ahead.

Now for the caveats. Stevens absolutely assumes that you know how to program in C and that you know how to use Unix development tools (or at least that you have some other source from which to learn them). This is not the book to learn how to use C or particular shells, editors, compilers, linkers, or debuggers. Similarly, new Unix variants, such as Linux and MacOS X, receive no specific mention here at all (though the book is invaluable for both). Also, there is no discussion of the various GUI interfaces offered on many current Unix systems - for those, some other book will necessary.

One other thing worth mentioning is the cost of the book. Don't be put off by it - Stevens' book has been justifying that cost for a lot of readers for a lot of years.

In closing, I've been a developer for many years and have owned many computer books. I recommend very few of them, but can't recommend this one highly enough. It is one of the few books I've had that routinely lies open beside me when I work. In addition to my personal recommendation, you might look not only at all the positive reviews for this book, but also at the reviews for "competitive" books and notice how often they refer you back to this one. This book is the standard by which other UNIX programming books are measured, and so far, it has not been surpassed.

How to get it in China mainland - Review written on January 31, 2001
* * * * *
Rating: 5 out of 5
2 customers found this review helpful, 23 did not.

How can I get it(English version books) in China mainland !
Excellent for novices and advanced users alike. - Review written on January 06, 2001
* * * * *
Rating: 5 out of 5
7 customers found this review helpful.

Well, this is one of those rare books (like "Applied Cryptography") which manages to cover all aspects of the material, but also makes it easy for novices to understand. I'd suggest having a fairly thorough background in C before you try this book. However, you don't need a deep knowledge of UNIX to understand it!

After you get this book, you may want to do some socket (internet) programming. Since this book doesn't cover sockets in depth, I'd recommend (as a complement), "UNIX Network Programming, Volume 1: Networking APIs - Sockets and XTI " also by W. Richard Stevens.

The best ever printed - Review written on December 24, 2000
* * * * *
Rating: 5 out of 5
1 customer found this review helpful, 1 did not.

There's always something to learn. I must have read this book a dozen times, and I can say it's the best book I've ever read. If you really want to understand how Unix works, if you want a book really clear, coincise and useful, then you must buy this.. Don't care if it's a bit outdated, if you wanna learn Unix or Linux ... you can't avoid reading this!