Advanced Programming in the
UNIX Environment

by W. Richard Stevens
Addison-Wesley Professional Computing Series
0-201-56317-7 * Hardcover * 768 pages * ©1992
[Buy this book]

Chapter 7. The Environment of a Unix Process

Introduction * main Function * Process Termination * Command-Line Arguments * Environment List * Memory Layout of a C Program * Shared Libraries * Memory Allocation * Environment Variables * setjmp and longjmp Functions * getrlimit and setrlimit Functions * Summary

Example Relevant Functions
7.1 exit handlers: run functions upon exit atexit
7.2 Echo command line arguments argc, argv
(C convention, no man page)
7.5 Effect on non-local goto (setjmp/longjmp) on auto/register/volatile variables setjmp, longjmp
7.6 Incorrect usage (return) of auto variable fopen, setvbuf
7.7 Print current process resource limits getrlimit

[examples 7.3 and 7.4 are missing from the original distribution]

[Buy this book]