Catalogue


Advanced programming in the UNIX environment /
W. Richard Stevens.
imprint
Reading, Mass. : Addison-Wesley Pub. Co., c1992.
description
xviii, 744 p. ; 25 cm.
ISBN
0201563177
format(s)
Book
Holdings
Subjects
title subject
More Details
imprint
Reading, Mass. : Addison-Wesley Pub. Co., c1992.
isbn
0201563177
catalogue key
3194162
 
Includes bibliographical references (p. 713-717) and index.
A Look Inside
Excerpts
Introduction or Preface
Introduction This book describes the programming interface to the Unix system - the system call interface and many of the functions provided in the standard C library. It is intended for anyone writing programs that run under Unix.Like most operating systems, Unix provides numerous services to the programs that are running - open a file, read a file, start a new program, allocate a region of memory, get the current time-of-day, and so on. This has been termed thesystem call interface. Additionally, the standard C library provides numerous functions that are used by almost every C program (format a variable's value for output, compare two strings, etc.).The system call interface and the library routines have traditionally been described in Sections 2 and 3 of theUnix Programmer's Manual. This book is not a duplication of these sections. Examples and rationale are missing from theUnix Programmer's Manual, and that's what this book provides. Unix Standards The proliferation of different versions of Unix during the 1980s has been tempered by the various international standards that were started during the late 1980s. These include the ANSI standard for the C programming language, the IEEE POSIX family (still being developed), and the X/Open portability guide.This book also describes these standards. But instead of just describing the standards by themselves, we describe them in relation to popular implementations of the standards - System V Release 4 and the forthcoming 4.4BSD. This provides a real-world description, which is often lacking from the standard itself and from books that describe only the standard. Organization of the Book This book is divided into six parts: 1. An overview and introduction to basic Unix programming concepts and terminology (Chapter 1), with a discussion of the various Unix standardization efforts and different Unix implementations (Chapter 2). 2. I/O - unbuffered I/O (Chapter 3), properties of files and directories (Chapter 4), the standard I/O library (Chapter 5), and the standard system data files (Chapter 6). 3. Processes - the environment of a Unix process (Chapter 7), process control (Chapter 8), the relationships between different processes (Chapter 9), and signals (Chapter 10). 4. More I/O - terminal I/O (Chapter 11), advanced I/O (Chapter 12), and daemon processes (Chapter 13). 5. IPC - Interprocess communication (Chapters 14 and 15). 6. Examples - a database library (Chapter 16), communicating with a PostScript printer (Chapter 17), a modem dialing program (Chapter 18), and using pseudo terminals (Chapter 19). A reading familiarity with C would be beneficial as would some experience using Unix. No prior programming experience with Unix is assumed. This text is intended for programmers familiar with Unix and programmers familiar with some other operating system who wish to learn the details of the services provided by most Unix systems. Examples in the Text This book contains many examples - approximately 10,000 lines of source code. All the examples are in the C programming language. Furthermore, these examples are in ANSI C. You should have a copy of theUnix Programmer's Manualfor your system handy while reading this book, since reference is made to it for some of the more esoteric and implementation-dependent features.Almost every function and system call is demonstrated with a small, complete program. This lets us see the arguments and return values and is often easier to comprehend than the use of the function in a much larger program. But since some of the small programs are contrived examples, a few bigger examples are also included (Chapters 16, 17, 18, and 19). These larger examples demonstrate the programming techniques in larger, real-world examples.All the examples have been included in the text directly from their source files. A machi
Summaries
Long Description
Bestselling UNIX author W. Richard Stevens offers application developers and system programmers his professional, experience-based guidance on using the system call interface with C. In the first half of the book, Stevens describes more than 200 system calls and functions with a brief example program following each description. Having provided the basics, Stevens moves on to chapter-long examples. The book is applicable to all major UNIX releases, especially System V Release 4-including Solaris 2-and 4.4 BSD, including 386 BSD.
Main Description
Bestselling UNIX author Stevens offers application and system programmers his professional, experienced-based guidance on using the system call interface with C. Since good examples are the key to a book like this, a simple shell program is developed in the first chapter and then expanded throughout the book to demonstrate the principles.
Main Description
If you're an application developer or systems programmer, you can't afford to be without this complete, up-to-date guide to using the UNIX ® system call interface with C. Covering the most recent releases of System V Release 4 and 4.3 BSD, the first half of the book describes more than 200 system calls and functions with a brief example following each description. Once you have mastered the basics, Stevens moves on to chapter-long examples teaching you how to create a database library, a PostScript printer driver, a modem-dialer, and a program that runs other programs under a pseudo terminal. To make your analysis and understanding of this code even easier, and to allow you to modify it, all of the code in the book is available via UUNET. The book's thorough index and detailed appendices make Advanced Programming in the UNIX ® Environment an invaluable reference tool that all UNIX programmers - beginning to expert - will want on their book shelves.
Back Cover Copy
If you are an experienced C programmer with a working knowledge of UNIX, you cannot afford to be without this up-to-date tutorial on the system call interface and the most important functions found in the ANSI C library. Rich Stevens describes more than 200 system calls and functions; since he believes the best way to learn code is to read code, a brief example accompanies each description. Building upon information presented in the first 15 chapters, the author offers chapter-long examples teaching you how to create a database library, a PostScript printer driver, a modem dialer, and a program that runs other programs under a pseudo terminal. to make your analysis and understanding of this code even easier, and to allow you to modify it, all of the code in the book is available via UUNET. A 20-page appendix provides detailed function prototypes for all the UNIX, POSIX, and ANSI C functions that are described in the book, and lists the page on which each prototype function is described in detail. Additional tables throughout the text and a thorough index make Advanced Programming in the UNIX Environment an invaluable reference tool that all UNIX programmers - beginners to experts - will want on their bookshelves. Advanced Programming in the UNIX Environment is applicable to all major UNIX releases, especially System V Release 4 and the latest release of 4.3BSD, including 386BSD. These real-world implementations allow you to more clearly understand the status of the current and future standards, including IEEE POSIX and XPG3. 0201563177B04062001
Back Cover Copy
If you are an experienced C programmer with a working knowledge of UNIX, you cannot afford to be without this up-to-date tutorial on the system call interface and the most important functions found in the ANSI C library. Rich Stevens describes more than 200 system calls and functions; since he believes the best way to learn code is to read code, a brief example accompanies each description.Building upon information presented in the first 15 chapters, the author offers chapter-long examples teaching you how to create a database library, a PostScript printer driver, a modem dialer, and a program that runs other programs under a pseudo terminal. To make your analysis and understanding of this code even easier, and to allow you to modify it, all of the code in the book is available via UUNET.A 20-page appendix provides detailed function prototypes for all the UNIX, POSIX, and ANSI C functions that are described in the book, and lists the page on which each prototype function is described in detail. Additional tables throughout the text and a thorough index make Advanced Programming in the UNIX Environment an invaluable reference tool that all UNIX programmers - beginners to experts - will want on their bookshelves.Advanced Programming in the UNIX Environment is applicable to all major UNIX releases, especially System V Release 4 and the latest release of 4.3BSD, including 386BSD. These real-world implementations allow you to more clearly understand the status of the current and future standards, including IEEE POSIX and XPG3. 0201563177B04062001
Table of Contents
Introduction
Logging In
Files and Directories
Input and Output
Programs and Processes
ANSI C Features
Error Handling
User Identification
Signals
Unix Time Values
System Calls and Library Functions
Unix Standardization and Implementations
Unix Standardization
ANSI C. IEEE POSIX. X/Open XPG3
FIPS. Unix Implementations
System V Release 4 4.3+BSD
Relationship of Standards and Implementations
Limits
ANSI C Limits
POSIX Limits
XPG3 Limits. sysconf, pathconf, and fpathconf Functions
FIPS 151-1 Requirements
Summary of Limits
Indeterminate Run-Time Limits
Feature Test Macros
Primitive System Data Types
Conflicts Between Standards
File I/O
File Descriptors. open Function. creat Function. close Function. lseek Function. read Function. write Function
I/O Efficiency
File Sharing
Atomic Operations. dup and dup2 Functions. fcntl Function. ioctl Function. /dev/fd
Files and Directories
stat, fstat, and lstat Functions
File Types
Set-User-ID and Set-Group-ID. File Access Permissions
Ownership of New Files and Directories. access Function. umask Function. chmod and fchmod Functions
Sticky Bit. chown, fchown, and lchown Functions
File Size
File Truncation
Filesystems. link, unlink, remove, and rename Functions
Symbolic Links. symlink and readlink Functions
File Times. utime Function. mkdir and rmdir Functions
Reading Directories. chdir, fchdir, and getcwd Functions
Special Device Files. sync and fsync Functions
Summary of File Access Permission Bits
Standard I/O Library
Streams and FILE Objects
Standard Input, Standard Output, and Standard Error
Buffering
Opening a Stream
Reading and Writing a Stream
Line-at-a-Time I/O. Standard I/O Efficiency
Binary I/O. Positioning a Stream
Formatted I/O. Implementation Details
Temporary Files
Alternatives to Standard I/O
System Data Files and Information
Password File
Shadow Passwords
Group File
Supplementary Group IDs
Other Data Files
Login Accounting
System Identification
Time and Date Routines
The Environment of a Unix Process
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
Process Control
Process Identifiers. fork Function. vfork Function. exit Functions. wait and waitpid Functions. wait3 and wait4 Functions
Race Conditions. exec Functions
Changing User IDs and Group IDs
Interpreter Files. system Function
Process Accounting
User Identification
Process Times
Process Relationships
Terminal Logins
Network Logins
Process Groups
Sessions
Controlling Terminal. tcgetpgrp and tcsetpgrp Functions
Job Control
Shell Execution of Programs
Orphaned Process Groups 4.3+BSD Implementation
Signals
Signal Concepts. signal Function
Unreliable Signals
Interrupted System Calls
Reentrant Functions
SIGCLD Semantics
Reliable Signal Terminology an
Table of Contents provided by Publisher. All Rights Reserved.

This information is provided by a service that aggregates data from review sources and other sources that are often consulted by libraries, and readers. The University does not edit this information and merely includes it as a convenience for users. It does not warrant that reviews are accurate. As with any review users should approach reviews critically and where deemed necessary should consult multiple review sources. Any concerns or questions about particular reviews should be directed to the reviewer and/or publisher.

  link to old catalogue

Report a problem