Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.

  • Apple
  • Android
  • Windows Phone
  • Android

To get the free app, enter your mobile phone number.

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

4.9 out of 5 stars 35 customer reviews
ISBN-13: 978-0321525949
ISBN-10: 0321525949
Why is ISBN important?
This bar-code number lets you verify that you're getting exactly the right version or edition of a book. The 13-digit and 10-digit formats both work.
Scan an ISBN with your phone
Use the Amazon App to scan ISBNs and compare prices.
Have one to sell? Sell on Amazon
Buy used
Condition: Used - Good
Condition: Used: Good
Comment: Book is in good sound condition with normal wear to the edges and cover. No markings, highlighting or tears to the interior pages or cover. Pages are clean and turn well. *Any necessary cleaning has been done with a non-toxic formula.* Ships directly from Amazon. Guaranteed by Amazon.
Access codes and supplements are not guaranteed with used items.
26 Used from $5.25
More Buying Choices
9 New from $35.00 26 Used from $5.25

There is a newer edition of this item:

Free Two-Day Shipping for College Students with Prime Student Free%20Two-Day%20Shipping%20for%20College%20Students%20with%20Amazon%20Student

The Amazon Book Review
The Amazon Book Review
Author interviews, book reviews, editors picks, and more. Read it now
click to open popover

Editorial Reviews

From the Back Cover

"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.

About the Author

The late W. Richard Stevens was the acclaimed author of UNIX® Network Programming, Volumes 1 and 2, widely recognized as the classic texts in UNIX networking; as well as TCP/IP Illustrated, Volumes 1-3, and the first edition of this book.

Stephen A. Rago is the author of UNIX® System V Network Programming (Addison-Wesley, 1993). Rago was one of the Bell Laboratories developers who built UNIX System V, Release 4. He served as a technical reviewer for the first edition of Advanced Programming in the UNIX® Environment. Rago currently works as a manager at EMC, specializing in file servers and file systems.


New York Times best sellers
Browse the New York Times best sellers in popular categories like Fiction, Nonfiction, Picture Books and more. See more

Product Details

  • Paperback: 960 pages
  • Publisher: Addison-Wesley Professional; 2 edition (June 27, 2005)
  • Language: English
  • ISBN-10: 0321525949
  • ISBN-13: 978-0321525949
  • Product Dimensions: 7.3 x 1.8 x 9.2 inches
  • Shipping Weight: 3.1 pounds
  • Average Customer Review: 4.9 out of 5 stars  See all reviews (35 customer reviews)
  • Amazon Best Sellers Rank: #1,157,102 in Books (See Top 100 in Books)

Customer Reviews

Top Customer Reviews

By calvinnme HALL OF FAME on December 2, 2005
Format: Hardcover
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.Read more ›
Comment 60 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Format: Hardcover
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.
Comment 30 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Format: Paperback
This book is a classic and remains a very valuable conceptual guide. While the text seems to be up-to-date, the accompanying code suffers from the age of the environment in which is was originally written and has not been ported to Linux. I write this review from the Linux point of view as I am not programming in the Sun or BSD environment.

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.
Comment 14 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Format: Hardcover
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 :)
Comment 6 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Format: Hardcover
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.
Comment 11 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse

Most Recent Customer Reviews