Enter your mobile number 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.
Getting the download link through email is temporarily not available. Please check back later.

  • Apple
  • Android
  • Windows Phone
  • Android

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

Advanced Programming in the UNIX Environment (2nd Edition) 2nd Edition

4.9 out of 5 stars 35 customer reviews
ISBN-13: 078-5342433074
ISBN-10: 0201433079
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: Very Good
Comment: 2nd edition. Very little wear on corners and edges.
Access codes and supplements are not guaranteed with used items.
26 Used from $2.89
FREE Shipping on orders over $25.
More Buying Choices
9 New from $51.18 26 Used from $2.89

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

Windows 10 For Dummies Video Training
Get up to speed with Windows 10 with this video training course from For Dummies. Learn more.
click to open popover

Editorial Reviews

From the Back Cover

"Stephen Rago's update is a long overdue benefit to the community of professionals using the versatile family of UNIX and UNIX-like operating environments. It removes obsolescence and includes newer developments. It also thoroughly updates the context of all topics, examples, and applications to recent releases of popular implementations of UNIX and UNIX-like environments. And yet, it does all this while retaining the style and taste of the original classic."

--Mukesh Kacker, cofounder and former CTO of Pronto Networks, Inc.

"One of the essential classics of UNIX programming."

--Eric S. Raymond, author ofThe Art of UNIX Programming

"This is the definitive reference book for any serious or professional UNIX systems programmer. Rago has updated and extended the classic Stevens text while keeping true to the original. The APIs are illuminated by clear examples of their use. He also mentions many of the pitfalls to look out for when programming across different UNIX system implementations and points out how to avoid these pitfalls using relevant standards such as POSIX 1003.1, 2004 edition and the Single UNIX Specification, Version 3."

--Andrew Josey, Director, Certification, The Open Group, and Chair of the POSIX 1003.1 Working Group

"Advanced Programming in the UNIX® Environment, Second Edition,is an essential reference for anyone writing programs for a UNIX system. It's the first book I turn to when I want to understand or re-learn any of the various system interfaces. Stephen Rago has successfully revised this book to incorporate newer operating systems such as GNU/Linux and Apple's OS X while keeping true to the first edition in terms of both readability and usefulness. It will always have a place right next to my computer."

--Dr. Benjamin Kuperman, Swarthmore College

Praise for the First Edition

"Advanced Programming in the UNIX® Environmentis a must-have for any serious C programmer who works under UNIX. Its depth, thoroughness, and clarity of explana-tion are unmatched."

--UniForum Monthly

"Numerous readers recommendedAdvanced Programming in the UNIX® Environmentby W. Richard Stevens (Addison-Wesley), and I'm glad they did; I hadn't even heard of this book, and it's been out since 1992. I just got my hands on a copy, and the first few chapters have been fascinating."

--Open Systems Today

"A much more readable and detailed treatment of UNIX internals can be found inAdvanced Programming in the UNIX® Environmentby W. Richard Stevens (Addison-Wesley). This book includes lots of realistic examples, and I find it quite helpful when I have systems programming tasks to do."


"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

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® Environmenthas 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

We are deeply saddened to learn of the death of noted author W. Richard Stevens. His passing is obviously a tremendous loss for the technical community, but it is a personal one for us as well. Rich was both a gifted colleague and a valued friend who will be greatly missed. We extend our sympathies to his family.

Obituary from the Arizona Daily Star:

STEVENS, W. Richard, noted author of computer books died on September 1. He is best known for his "UNIX Network Programming" series (1990, 1998, 1999), "Advanced Programming in the UNIX Environment" (1992), and "TCP/IP Illustrated" series (1994, 1995, 1996). Richard was born in 1951 in Luanshya, Northern Rhodesia (now Zambia), where his father worked for the copper industry. The family moved to Salt Lake City, Hurley, New Mexico, Washington, DC and Phalaborwa, South Africa. Richard attended Fishburne Military School in Waynesboro, Virginia. He received a B.SC. in Aerospace Engineering from the University of Michigan in 1973, and an M.S. (1978) and Ph.D. (1982) in Systems Engineering from the University of Arizona. He moved to Tucson in 1975 and from then until 1982 he was employed at Kitt Peak National Observatory as a computer programmer. From 1982 until 1990 he was Vice President of Computing Services at Health Systems International in New Haven, CT, moving back to Tucson in 1990. Here he pursued his career as an author and consultant. He was also an avid pilot and a part-time flight instructor during the 1970's.

He is survived by his loving wife of 20 years, Sally Hodges Stevens; three wonderful children, Bill, Ellen and David; sister, Claire Stevens of Las Vegas, NV; brother, Bob and wife Linda Stevens of Dallas, TX; nieces, Laura, Sarah, Collette, Christy; and nephew, Brad. He is predeceased by his parents, Royale J. Stevens (1915-1984); and Helen Patterson Stevens (1916-1997). Helen lived in Tucson from 1991-1997, and Royale lived here in the early 1930's attending Tucson High School while his father was treated for TB at the Desert Sanitorium (now TMC). The family asks that in lieu of flowers, donations be made in Richard's name to Habitat for Humanity, 2950 E. 22nd Street, Tucson, AZ 85713. A memorial service for Richard will be held at St. Phillip's in the Hills Episcopal Church on Tuesday, September 7th at 12:00 noon. Following the service there will be a reception in the Murphy Gallery of the Church. Please wear colorful clothing to the service; Richard loved colors.

W. Richard Stevens was an acknowledged UNIX and networking expert and the highly-respected author of several books. He was also a sought-after instructor and consultant.

Stephen A. Rago, one of the Bell Laboratories developers who built UNIX System V, Release 4, currently works as a manger 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

  • Hardcover: 927 pages
  • Publisher: Addison-Wesley Professional; 2nd edition (June 27, 2005)
  • Language: English
  • ISBN-10: 0201433079
  • ISBN-13: 978-0201433074
  • Product Dimensions: 7.6 x 2.1 x 9.5 inches
  • Shipping Weight: 4 pounds
  • Average Customer Review: 4.9 out of 5 stars  See all reviews (35 customer reviews)
  • Amazon Best Sellers Rank: #782,106 in Books (See Top 100 in Books)

Customer Reviews

Top Customer Reviews

By calvinnme HALL OF FAMEVINE VOICE 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