Summary
Because network daemons are intended to run in an unattended fashion for long periods of time, it's worth investing a little extra time to make the code bullet-proof. This chapter presented some of the common techniques for increasing the stability, manageability, and security of network daemons.
Logging, whether directly to a file or to a standard logging daemon, allows you to monitor the status of the daemon and to detect exceptional conditions.
Privilege manipulation enables daemons to perform certain startup and shutdown tasks as privileged users, but to abandon those privileges before interacting with untrusted network clients. This avoids the daemon's inadvertently damaging the host (whether on its own or encouraged by a hostile ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access