Advanced Programming in the
UNIX Environment

by W. Richard Stevens
Addison-Wesley Professional Computing Series
0-201-56317-7 * Hardcover * 768 pages * ©1992
[Buy this book]

Chapter 13. Daemon Processes

Introduction * Daemon Characteristics * Coding Rules * Error Logging * SVR4 Streams log Driver * 4.3+BSD syslog Facility * Client-Server Model * Summary

Example Relevant Functions
13.1 daemon_init: Initialize a daemon process
Become a session leader
Become a process-group leader
Dissociate from controlling terminal
chdir to '/'
Set file creation mask to 0: umask(0)
Still need to close unneded descriptors (not shown)

[Buy this book]