Using C on the UNIX System provides a thorough introduction to the UNIX system call libraries. It is aimed at programmers who already know C, but who want to take full advantage of the UNIX programming environment. If you want to learn how to work with the operating system and to write programs that can interact with directories, terminals, and networks at the lowest level, you will find this book essential. It is impossible to write UNIX utilities of any sophistication without understanding the material in this book.
Even if you don't want to program at this level, familiarity with the UNIX system interface is the mark of an experienced and fluent user. If you want to know how the C shell performs job control or how network addressing works, you will find the answer here. Your knowledge of the UNIX system is fundamentally incomplete until you can make C work for you.
Using C provides discussions of the most important system calls as well as detailed descriptions of the important system data structures.
Topics covered include:
Low-level I/O (open, close, read, write).
Files, directories, and the low-level structure of the file system.
I/O control, including terminal management (ioctl).
Reading the system administrative databases (getpwent, etc.).
Time, timers, and timing.
How one program starts another program (system, execv, fork).
Interprocess communication (sockets, message queues, semaphores, shared memory).
Networking (addressing, port numbers).
This book is based on Berkeley 4.3 UNIX, but also covers System V.
Our look is the result of reader comments, our own experimentation, and feedback from distribution channels. Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects. The animal featured on the cover of Using C on the UNIX System is a lion, a large, carnivorous cat inhabiting western India and Africa south of the Sahara. The most sociable of cats, lions live in prides consisting of one to four males and a collection of up to thirty females and cubs. However, the members of a pride are seldom all together at one time, instead moving about their territory as individuals or small groups. A pride's territory may be anywhere from 15 to 150 square miles, depending on the abundance of food, and is marked by scent and roaring.
Lions eat both fresh kill and carrion--dead animals or the kill of other animals. When they do kill, they show a preference for large prey such as zebra or wildebeest which will feed the entire pride. Females do the majority of the hunting, frequently working cooperatively to encircle or bring down large game. During the hunt, lions are careful to move under cover of darkness or foliage, but tend to disregard the wind direction and thus frequently give themselves away. UNIX and its attendant programs can be unruly beasts. Nutshell Handbooks(R) help you tame them.
Edie Freedman designed this cover and the entire UNIX bestiary that appears on other Nutshell Handbooks. The beasts themselves are adapted from 19th-century engravings from the Dover Pictorial Archive.
The text of this book is set in Times Roman; headings are Helvetica; examples are Courier. Text was prepared using SortQuad's sqtroff text formatter. Figures are produced with a Macintosh. Printing is done on an Apple LaserWriter.