Daemon: Difference between revisions

From WikiMD's Wellness Encyclopedia

CSV import
CSV import
Line 41: Line 41:
[[Category:Unix software]]
[[Category:Unix software]]
{{Computing-stub}}
{{Computing-stub}}
{{No image}}
{{No image}}
{{No image}}

Revision as of 13:17, 10 February 2025

Daemon

A daemon is a background process that runs on a computer system, typically without direct user interaction. Daemons are often initiated at boot time and run continuously, providing various services to the system and its users.

Etymology

The term "daemon" is derived from the Greek word "δαίμων" (daimōn), which refers to a supernatural being or spirit. In computing, the term was popularized by the Project MAC at MIT in the 1960s.

Functionality

Daemons perform a variety of tasks, including handling network requests, managing hardware devices, and performing system maintenance. Common examples of daemons include:

Characteristics

Daemons typically have the following characteristics:

  • They run in the background and do not have a controlling terminal.
  • They are often started at system boot and run continuously.
  • They can be controlled through init systems like systemd, Upstart, or SysVinit.

Implementation

To create a daemon, a process usually follows these steps: 1. Fork off the parent process. 2. Create a new session and process group. 3. Close all open file descriptors. 4. Change the working directory to the root directory. 5. Reset the file mode creation mask. 6. Handle signals appropriately.

Examples of Daemons

  • inetd - The internet super-server daemon.
  • named - The BIND DNS server daemon.
  • cupsd - The CUPS printing system daemon.

Related Concepts

  • Service - A similar concept in Microsoft Windows operating systems.
  • Background process - A process that runs in the background but is not necessarily a daemon.
  • Init - The first process started during booting of the computer system.

See Also

Stub icon
   This article is a computing stub. You can help WikiMD by expanding it!