Cover image for UNIX system programming : a programmer's guide to software development
UNIX system programming : a programmer's guide to software development
Haviland, Keith, 1958-
Personal Author:
Second edition / revised and updated by Keith Haviland and Dina Gray.
Publication Information:
Harlow, England ; Reading, Mass. : Addison-Wesley, [1999]

Physical Description:
xx, 350 pages : illustrations ; 24 cm
Title Subject:
Format :


Call Number
Material Type
Home Location
Item Holds
QA76.76.O63 H383 1999 Adult Non-Fiction Central Closed Stacks

On Order



This is a thoroughly revised edition of the best-selling guide to UNIX software development in C for professional programmers and students. The book focuses on the UNIX system call interface, the programming interface between the UNIX Kernel and applications software running in the UNIX environment. The techniques required by systems programmers are developed in depth, illustrated by a wealth of examples.

Author Notes

Keith Haviland is a partner in Accenture. Among other responsibilities, he co-founded and leads its London Solution Centre, now a major 800-seat development center which undertakes complex development projects for Accenture including much e-commerce work. He is the lead author of UNIX Systems Programming, a successful guide to this major operating system first published in 1987, which according to Amazon has been hot in Albany, New York. His specialist areas include UNIX, technical architecture, e-commerce solutions and technology, and software solution delivery excellence at all scales. Most importantly, Keith has four energetic children who all clearly belong to the digital era.

Ben Salama works for SHL Systemshouse.


Table of Contents

1 Basic Concepts and Terminology
1.1 The file
1.2 The process
1.3 System calls and library subroutines
2 The File
2.1 UNIX file access primitives
2.2 Standard input, standard output and standard error
2.3 The standard I/O library: a look ahead
2.4 The erno variable and system calls
3 The File in Context
3.1 Files in a multi-user environment
3.2 Files with multiple names / Obtaining file information: stat and fstat
4 Directories, File Systems and Special Files
4.1 Introduction
4.2 Directories: the user view
4.3 The implementation of a directory
4.4 Programming with directories
4.5 UNIX file systems
4.6 UNIX device files
5 The Process
5.1 Review of the notion of a process
5.2 Creating processes
5.3 Running new programs with exec
5.4 Using exec and form together
5.5 Inherited data and file descriptors
5.6 Terminating processes with the exit system call
5.7 Synchronising processes
5.8 Zombies and premature exits
5.9 smallsh: a command processor
5.10 Process attributes
6 Signals and Signal Handling
6.1 Introduction
6.2 Signal handling
6.3 Signal blocking
6.4 Sending signals
7 Interprocess Communication Using Pipes
7.1 Pipes
7.2 FIFOs or named pipes
8 Advanced Inter-Process Communications
8.1 Introduction
8.2 Record locking
8.3 Advanced IPC facilities
9 The Terminal
9.1 Introduction
9.2 The UNIX terminal
9.3 The programmers view
9.4 The connect example
10 An Introduction to Unix Networking
10.1 Introduction
10.2 Overview
10.3 Addressing a process
10.4 Socket interface
10.5 Programming the connection oriented model
10.6 Programming the connectionless oriented model
10.7 Transport level interface
11 The Standard I/O Library
11.1 Introduction
11.2 File structures
11.3 Opening and closing streams: fopen and fclose
11.4 Single-character I/O: getc and putc
11.5 Pushing characters back onto a stream: ungetc
11.6 Standard input, standard output and standard error
11.7 Standard I/O status routines
11.8 Input and output by line
11.9 Binary input and output: fread and fwrite
11.10 Random file access: fseek, rewind, ftell
11.11 Formatted output: the printf family
11.12 Formatted input: the scanf family
11.13 Running programs with the Standard I/O Library
11.14 Miscellaneous calls
12 Micellaneous System Calls and Library Routines
12.1 Introduction
12.2 Dynamic memory management
12.3 Memory mapped i/O
12.4 Time
12.5 String and character manipulation
12.6 A selection of other useful functions