Advanced Programming in the UNIX Environment (3rd Edition) by W. Richard Stevens, Stephen A. Rago

By W. Richard Stevens, Stephen A. Rago

For greater than two decades, critical C programmers have trusted one publication for sensible, in-depth wisdom of the programming interfaces that force the UNIX and Linux kernels: W. Richard Stevens’ Advanced Programming within the UNIX® Environment . Now, once more, Rich’s colleague Steve Rago has completely up to date this vintage paintings. the hot 3rd variation helps today’s best systems, displays new technical advances and top practices, and aligns with model four of the one UNIX Specification.

Steve rigorously keeps the spirit and technique that experience made this e-book so invaluable. construction on Rich’s pioneering paintings, he starts off with documents, directories, and approaches, conscientiously laying the basis for extra complex innovations, resembling sign dealing with and terminal I/O. He additionally completely covers threads and multithreaded programming, and socket-based IPC.

This variation covers greater than seventy new interfaces, together with POSIX asynchronous I/O, spin locks, limitations, and POSIX semaphores. so much out of date interfaces were got rid of, apart from a number of which are ubiquitous. approximately all examples were proven on 4 smooth systems: Solaris 10, Mac OS X model 10.6.8 (Darwin 10.8.0), FreeBSD 8.0, and Ubuntu model 12.04 (based on Linux 3.2).

As in earlier variants, you’ll research via examples, together with greater than 10000 strains of downloadable, ISO C resource code. greater than 400 process calls and features are validated with concise, whole courses that essentially illustrate their utilization, arguments, and go back values. To tie jointly what you’ve discovered, the booklet provides a number of chapter-length case stories, each one reflecting modern environments.

Advanced Programming within the UNIX® atmosphere has helped generations of programmers write code with unprecedented strength, functionality, and reliability. Now up-to-date for today’s structures, this 3rd variation should be much more helpful.

Show description

Read Online or Download Advanced Programming in the UNIX Environment (3rd Edition) (Addison-Wesley Professional Computing Series) PDF

Best unix books

Building a Virtual Private Network

What you are promoting needs to be hooked up so as to compete within the worldwide market. staff want to know that their company's community is offered at any time, from anywhere. A digital deepest community (VPN) accomplishes this through the use of distant connectivity applied sciences that mix latest inner networks with the web to safely converse details.

Mac OS X Leopard Phrasebook

Mac OS® X Leopard Phrasebook   Brian Tiemann   crucial Code and instructions   Mac OS X Leopard Phrasebook offers the total command words you want to take complete good thing about the Leopard’s hidden and undocumented strength beneath the graphical person interface: time-saving ideas for successfully operating with documents, folders, the Finder, highlight, textual content records, servers, disks, CDs/DVDs, permissions, printing, purposes, Expos?

DNS & BIND Cookbook

The DNS & BIND Cookbook provides recommendations to the various difficulties confronted by way of community directors accountable for a reputation server. Following O'Reilly's well known problem-and-solution cookbook structure, this identify is an crucial better half to DNS & BIND, 4th version, the definitive consultant to the severe job of brand name server management.

Additional resources for Advanced Programming in the UNIX Environment (3rd Edition) (Addison-Wesley Professional Computing Series)

Example text

The fgets function, for example, reads an entire line. The read function, in contrast, reads a specified number of bytes. 4, the standard I/O library provides functions that let us control the style of buffering used by the library. The most common standard I/O function is printf. h—as this header contains the function prototypes for all the standard I/O functions. 8, is like the previous program that called read and write. This program copies standard input to standard output and can copy any regular file.

This library is important because all contemporary UNIX systems, such as the ones described in this book, provide the library routines that are specified in the C standard. In 1999, the ISO C standard was updated and approved as ISO/IEC 9899:1999, largely to improve support for applications that perform numerical processing. The changes don’t affect the POSIX interfaces described in this book, except for the addition of the restrict keyword to some of the function prototypes. This keyword is used to tell the compiler which pointer references can be optimized, by indicating that the object to which the pointer refers is accessed in the function only via that pointer.

H. We include this header in almost every program in this text. This header includes some standard system headers and defines numerous constants and function prototypes that we use throughout the examples in the text. A listing of this header is in Appendix B. h, to pick up the function prototypes for opendir and readdir, in addition to the definition of the dirent structure. On some systems, the definitions are split into multiple header files. h, which defines the dirent structure (and is actually stored in /usr/include/x86_64-linux-gnu/bits).

Download PDF sample

Rated 4.37 of 5 – based on 33 votes