Daemon: Difference between revisions
CSV import |
CSV import |
||
| Line 43: | Line 43: | ||
{{No image}} | {{No image}} | ||
{{No image}} | {{No image}} | ||
__NOINDEX__ | |||
Latest revision as of 08:22, 17 March 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[edit]
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[edit]
Daemons perform a variety of tasks, including handling network requests, managing hardware devices, and performing system maintenance. Common examples of daemons include:
- cron - A time-based job scheduler.
- httpd - The Apache HTTP Server daemon.
- sshd - The OpenSSH daemon for secure shell access.
- syslogd - The system logging daemon.
Characteristics[edit]
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[edit]
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[edit]
- inetd - The internet super-server daemon.
- named - The BIND DNS server daemon.
- cupsd - The CUPS printing system daemon.
Related Concepts[edit]
- 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[edit]
