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 ...

Get Network Programming with Perl 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.