Creating a Daemon With Python | Linux Today

Creating a Daemon With Python

Written By
Web Webster
Web Webster
Nov 21, 2008

“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

Web Webster

Web Webster

Web Webster has more than 20 years of writing and editorial experience in the tech sector. He’s written and edited news, demand generation, user-focused, and thought leadership content for business software solutions, consumer tech, and Linux Today, he edits and writes for a portfolio of tech industry news and analysis websites including webopedia.com, and DatabaseJournal.com.

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.