37DAEMONS
This chapter examines the characteristics of daemon processes and looks at the steps required to turn a process into a daemon. We also look at how to log messages from a daemon using the syslog facility.
37.1 Overview
A daemon is a process with the following characteristics:
• It is long-lived. Often, a daemon is created at system startup and runs until the system is shut down.
• It runs in the background and has no controlling terminal. The lack of a controlling terminal ensures that the kernel never automatically generates any job-control or terminal-related signals (such as SIGINT, SIGTSTP, and SIGHUP) for a daemon.
Daemons are written to carry out specific tasks, as illustrated by the following examples:
• cron: a daemon that executes ...
Get The Linux Programming Interface now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.