“Daemon Defined
“A daemon is a process on UNIX that runs in the background and
will typically keep running until it is explicitly told to stop.
Examples of daemon processes include web servers (lighttpd and
Apache httpd), schedulers (cron and at), DNS servers (bind), mail
servers (courier and dovecot), and database servers (MySQL and
PostgreSQL).“The typical web user will probably interact with at least one
UNIX daemon in the form of a web server, DNS server, or database
server on an average day. These types of processes run in the
background on a server somewhere, unattended by any person, working
tirelessly to do the work that they were designed for.“You can background a process on UNIX by putting an ampersand
(&) at the end of the command that you started it with. For
example:“dink:~ jmjones$ $(sleep 10; echo echo “WAKING UP”;) & [1]
314dink:~ jmjones$ WAKING UP
This backgrounded the sleep and echo commands. Ten seconds
later, after sleep completed, the command echoed “WAKING UP” and
appeared on my terminal. But just running a process in the
background doesn’t qualify it for daemon status. There are some
deeper technical qualifications that an aspiring process has to
meet in order to be branded with the daemon label.”
Creating a Daemon With Python
By
Get the Free Newsletter!
Subscribe to Developer Insider for top news, trends, & analysis