Synopses & Reviews
The UNIX operating system has become a key part of the technology landscape as we move into the 21st century. There are now a huge number of large-scale data management and transaction-processing systems built on UNIX platforms, and UNIX is at the core of the server backbone of the Internet. 'The new edition of this highly successful book for professional programmers provides a lucid and well structured guide to developing UNIX software in the C language, and has been updated to reflect the more distributed environments typical of current IT solutions.
UNIX System Programming concentrates on a detailed study of the UNIX system call interface - the programming interface between the UNIX kernel and application software running in the UNIX environment - and additionally covers some of the more important subroutine libraries.
Features fundamental techniques are developed in depth and are fully supported with program examples highly relevant to the two important standards - the X/OPEN portability guide and the IEEE POSIX standard strong emphasis on exercises and examples throughout
New to this edition
more on signals and signal handling
more on interprocess communication using pipes
more on advanced interprocess communications and the terminal whole section on sockets
From a wealth of experience of developing system and application software, and a real appreciation of the needs of UNIX system programmers, the authors fully appreciate that computing is not a spectator sport. By exploring both system calls and subroutine libraries they give the reader a practical appreciation of when not to reinvent the wheel, as well as a better understanding of the internal workings of this still elegant operating system.
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.
3.3. Obtaining file information: stat and fstat.
4. Directories, File Systems and Special Files.
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.2. Signal handling.
6.3. Signal blocking.
6.4. Sending signals.
7. Interprocess Communication Using Pipes.
7.2. FIFOs or named pipes.
8. Advanced Inter-Process Communications.
8.2. Record locking.
8.3. Advanced IPC facilities.
9. The Terminal.
9.2. The UNIX terminal.
9.3. The programmers view.
9.4. The connect example.
10. An Introduction to UNIX Networking.
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 Libary.
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.2. Dynamic memory management.
12.3. Memory mapped i/O.
12.5. String and character manipulation.
12.6. A selection of other useful functions.
This text concentrates on the programming interface that exists between the UNIX kernel and applications software that runs in the UNIX environment - the UNIX system call interface.