Home - APIs & Operating Environments
Advanced Programming in the UNIX Environment, Second Edition (Addison-Wesley Professional Computing Series)
Price:
$44.31
$69.99
& 2-Day * Free Nationwide Shipping! (* details)
Availability: Usually ship in 24 hours if sold by Amazon.com
Product Details
| Binding: | Paperback |
|---|---|
| EAN: | 9780321525949 |
| Label: | Addison-Wesley Professional |
| Feature: | |
| Publisher: | Addison-Wesley Professional |
| Studio: | Addison-Wesley Professional |
Editorial Reviews
"This is the definitive reference book for any serious or professional UNIX systems programmer. Rago has updated and extended the original Stevens classic while keeping true to the original."
—Andrew Josey, Director, Certification, The Open Group, and Chair of the POSIX 1003.1 Working Group
The same trusted content from the Second Edition, now in paperback!
For over a decade, serious C programmers have relied on one book for practical, in-depth knowledge of the programming interfaces that drive the UNIX and Linux kernels: W. Richard Stevens' Advanced Programming in the UNIX® Environment. Now, Stevens' colleague Stephen Rago has thoroughly updated this classic to reflect the latest technical advances and add support for today's leading UNIX and Linux platforms.
Rago carefully retains the spirit and approach that made this book a classic. Building on Stevens' work, he begins with basic topics such as files, directories, and processes, carefully laying the groundwork for understanding more advanced techniques, such as signal handling and terminal I/O.
Substantial new material includes chapters on threads and multithreaded programming, using the socket interface to drive interprocess communication (IPC), and extensive coverage of the interfaces added to the latest version of the POSIX.1 standard. Nearly all examples have been tested on four of today's most widely used UNIX/Linux platforms: FreeBSD 5.2.1; the Linux 2.4.22 kernel; Solaris 9; and Darwin 7.4.0, the FreeBSD/Mach hybrid underlying Apple's Mac OS X 10.3.
As in the first edition, you'll learn through example, including more than 10,000 lines of downloadable, ANSI C source code. More than 400 system calls and functions are demonstrated with concise, complete programs that clearly illustrate their usage, arguments, and return values. To tie together what you've learned, the book presents several chapter-length case studies, each fully updated for contemporary environments.
Advanced Programming in the UNIX® Environment has helped a generation of programmers write code with exceptional power, performance, and reliability. Now updated for today's UNIX/Linux systems, this second edition will be even more indispensable.
Customer Reviews
If you want to be a UNIX Guru, then this is definitely the book for you :)
I purchased the book with the idea of learning pty programming for Fedora. While the chapter was very informative in its discussions, using the man pages is required. As the source code accompanying the book doesn't address Linux, per se, and one may be tempted to use the apue.linux3.tar.Z download with its Red Hat port of the common library. Downloading it may be helpful, but the added code was written for Red Hat 6 and the book is newer than that. Specifically, the pty open code was not functional and I reverted to the svr4 code which still needed tweaking.
Some of the original sample code is architecturally out of step with the current way of doing things. For example, originally ptys were found by canonically generating all pty names until one could be successfully opened. The sample code is written to return the successfully generated name. The current method in Linux (and elsewhere, I suppose) is to open("/dev/ptmx") and then call ptsname(). So plan on using this to study and then writing your own more modern code or tweak the sample code as needed. Of course, one of the goals of the code is to create a portable library to support various *nix flavors, so this criticism may be overstated.
Still, it seems a thorough modernization of the sample code would have made this book more valuable. But as I said, I am not programming in the Sun or BSD environment.
of legacy code between Solaris, Linux, etc., code written years ago by somebody
else in C.
This book, (and Stevens' earlier books before this) has been immensely useful.
The code samples alone are worth their weight in gold :-). Seriously, this book
has saved me many days of hard work, several times over.
A quick browse of the book is usually enough to find the details (what I would
call 'arcane details', but I guess this is because I'm not an expert C/networking
programmer), figure out the problem AND how to fix the problem.
This book has been a 'project-saver'. I cannot recommend this text too highly.
1. The book focuses heavily on standards and portability. Throughout the book, API and implementations are described according to the SUS or XSI standards. However, to book maintains a firm grasp on reality by tracking 4 real Unix-like systems, Solaris, Linux, Mac OS X, and FreeBSD throughout and noting implementation specific exceptions and extensions where applicable.
2. A lot of illustrative example code is included. In some cases API functions are re-implemented to make it clear exactly how it works.
APUEv2 reads quite easily as a beginner's introduction to programming in the Unix environment. However it also includes a great deal of tables, charts, and figures to make it suitable as a reference for the more experienced programmer, useful as a back-up in case the local man pages are not available.
As mentioned in the foreword, readers should be comfortable with the C language itself before attempting to dive in to Unix programming.
Very good examples (you can find the codes online)
A lot of proffesors recomended this book
it is priceless for any Unix programmers.
many thanks to Stevens and Rago.
Meanwhile, I reproduce my review of the second edition, hardcover, from 2005, below. My remarks in it still stand.
===========================
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.
The real strength of this book is in the definitions. We get to see the purpose and flexibility of system calls and functions. Not just use them but understand them. UNIX functions as job control or signals are explained in detail. Let's take just one item "waitpid":
The waitpid function provides three features that aren't provided by the wait function.
You will have to red the book to find out what they are. However there are examples also. Now for people with real systems like AIX all you have to do is ad a "k" to the front of the call and you have the AIX kernel function call "kwaitpid"; voila you now have an understanding that can not be found clearly in a Red Book.
It does help some to have a preunderstanding of the system do you can use the book to fill in the education holes missed when necessary.
The index is worth its weight in gold as you can find functions headers and concepts all in alphabetical order. My favorite is the definitions.
As much as I am a fan of the internet it also pays to carry the information in the form of a book. And all this book has to do is save a couple of hours and it has paid for its self.
Mastering UNIX Shell Scripting
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.
Create your own review


