Creating a Daemon With Python
Nov 21, 2008, 00:03 (0 Talkback[s])
(Other stories by Jeremy M. Jones)
"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]
314
dink:~ 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."
Complete Story
Related Stories:
- Building Command Line Utilities with Python(Nov 11, 2008)
- Comparison of Python virtual machines(Nov 09, 2008)
- Python Data Persistence Using MySQL(Oct 31, 2008)
- Python 3.0 Makes a Big Break(Oct 17, 2008)
- Python's New Release Bridges the Gap(Oct 03, 2008)
- Pytube - Best YouTube,Google manager, downloader and video converter for Ubuntu(Sep 15, 2008)
- With EasyGUI, I Can Stick with Python(Sep 14, 2008)
- Writing Plug-ins in Python(Sep 05, 2008)
- The A-Z of Programming Languages: Python(Aug 08, 2008)