Advanced UNIX Programming

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

The changes to UNIX programming that have taken place since 1985 are extensive to say the least. The first edition of Advanced UNIX Programming is still used and considered to be a must have book on any UNIX programmer's shelf. With this new edition UNIX programmers now have a one-volume, comprehensive, in-depth guide to the essential system-level services provided to them by the UNIX family of operating systems - now including Linux, FreeBSD, and the Mac OS X kernel (Darwin). All UNIX application programs, regardless of what language they are written in, run on top of these services, so mastering them is essential for successful UNIX programming. And, with a movement towards open-source systems, programmers will appreciate the book's emphasis on portability.

Author(s): Marc J. Rochkind
Edition: 2
Publisher: Addison-Wesley Professional
Year: 2004

Language: English
Pages: 735

Preface

Chapter 1 Fundamental Concepts
A Whirlwind Tour of UNIX and Linux
Versions of UNIX
Using System Calls
Error Handling
UNIX Standards
Common Header File
Dates and Times
About the Example Code
Essential Resources

Chapter 2 Basic File I/O
Introduction to File I/O
File Descriptors and Open File Descriptions
Symbols for File Permission Bits
open and creat System Calls
umask System Call
unlink System Call
Creating Temporary Files
File Offsets and O_APPEND
write System Call
read System Call
close System Call
User Buffered I/O
lseek System Call
pread and pwrite System Calls
readv and writev System Calls
Synchronized I/O
truncate and ftruncate System Calls

Chapter 3 Advanced File I/O
Introduction
Disk Special Files and File Systems
Hard and Symbolic Links
Pathnames
Accessing and Displaying File Metadata
Directories
Changing an I-Node
More File-Manipulation Calls
Asynchronous I/O

Chapter 4 Terminal I/O
Introduction
Reading from a Terminal
Sessions and Process Groups (Jobs)
ioctl System Call
Setting Terminal Attributes
Additional Terminal-Control System Calls
Terminal-Identification System Calls
Full-Screen Applications
STREAMS I/O
Pseudo Terminals

Chapter 5 Processes and Threads
Introduction
Environment
exec System Calls
Implementing a Shell (Version 1)
fork System Call
Implementing a Shell (Version 2)
exit System Calls and Process Termination
wait, waitpid, and waitid System Calls
Signals, Termination, and Waiting
Implementing a Shell (Version 3)
Getting User and Group IDs
Setting User and Group IDs
Getting Process IDs
chroot System Call
Getting and Setting the Priority
Process Limits
Introduction to Threads
The Blocking Problem

Chapter 6 Basic Interprocess Communication
Introduction
Pipes
dup and dup2 System Calls
A Real Shell
Two-Way Communication with Unidirectional Pipes
Two-Way Communication with Bidirectional Pipes

Chapter 7 Advanced Interprocess Communication
Introduction
FIFOs, or Named Pipes
An Abstract Simple Messaging Interface (SMI)
System V IPC (Interprocess Communication)
System V Message Queues
POSIX IPC
POSIX Message Queues
About Semaphores
System V Semaphores
POSIX Semaphores
File Locking
About Shared Memory
System V Shared Memory
POSIX Shared Memory
Performance Comparisons

Chapter 8 Networking and Sockets
Socket Basics
Socket Addresses
Socket Options
Simple Socket Interface (SSI)
Socket Implementation of SMI
Connectionless Sockets
Out-of-Band Data
Network Database Functions
Miscellaneous System Calls
High-Performance Considerations

Chapter 9 Signals and Timers
Signal Basics
Waiting for a Signal
Miscellaneous Signal System Calls
Deprecated Signal System Calls
Realtime Signals Extension (RTS)
Global Jumps
Clocks and Timers

Appendix A Process Attributes
Appendix B Ux: A C++ Wrapper for Standard UNIX Functions
Appendix C Jtux: A Java/Jython Interface to Standard UNIX Functions
Appendix D Alphabetical and Categorical Function Lists
References
Index