珙桐属于什么植物| 喻字五行属什么| 碘酒和碘伏有什么区别| 驾驶证b2能开什么车| 猫咪呕吐吃什么药| 体检挂什么科| 96年属什么的| 家里适合养什么鱼| 天干是什么| 喜欢吃酸的人是什么体质| 垂体催乳素高是什么原因| 洗耳恭听是什么意思| 孕妇补铁吃什么| 后中长是什么意思| 干咳无痰是什么原因引起的| 睡眠不好吃什么药| 为什么招蚊子| 眼皮有点肿是什么原因| 尿常规3个加号什么意思| 头疼想吐是什么原因| 什么原因导致卵巢早衰| 夏天可以玩什么| 吃什么紧致皮肤抗衰老| 1992属什么| 辰字属于五行属什么| 乘晕宁又叫什么| 火为什么没有影子| 什么样子| 什么叫梅毒| 禄是什么意思| 头伏饺子二伏面三伏吃什么| 孕妇缺维生素D对胎儿有什么影响| 感冒是挂什么科| 前列腺钙化斑是什么意思| 嗜是什么意思| 禹五行属什么| 八哥吃什么| 天加一笔变成什么字| 梦见老人去世预示什么| 白酒是什么时候出现的| 足癣用什么药最快好| 高沫是什么茶| 什么树林| 导购员是做什么的| 生气吃什么药可以顺气| 硬度不够吃什么药| 孩子为什么不愿意上学| 电解质水是什么| 晒背有什么好处| 尿比重高是什么原因| 什么减肥最好最快| 鼻子痒是什么原因| 抽筋吃什么药见效快| 圆舞曲是什么意思| 结婚纪念日送什么花| 妖魔鬼怪是什么生肖| 大是什么意思| 小孩晚上睡觉出汗是什么原因| 穿刺活检是什么意思| 学中医需要什么学历| 阿姨是什么意思| 什么是创造性思维| 动员是什么意思| 650是什么意思| 荨麻疹要注意些什么| 5d电影是什么| 嘴唇发紫发黑是什么原因| 吃葡萄皮有什么好处| 八爪鱼是什么| 眼睛总是流泪是什么原因| 补脑吃什么食物| 耳鸣什么原因引起的| 什么是spa| 怀孕生气对胎儿有什么影响| 女人蜕变是什么意思| 耳仓为什么是臭的| 籍贯写什么| 一个三点水一个及念什么| 眼睛总是干涩是什么原因| fps是什么意思| 一般手脚慢进什么工厂| 脸上出油多是什么原因| 马为什么不怕蛇毒| 肛裂用什么药治最好效果最快| 产后能吃什么水果| 北边是什么生肖| 高同型半胱氨酸血症是什么病| 66年属马是什么命| 郁是什么生肖| 什么颜色防晒| 419是什么意思| 肺部炎症用什么药最好| 疟原虫是什么生物| 辛弃疾字什么| 桃花劫是什么意思| 道德绑架是什么意思| 1953年是什么年| 实时更新是什么意思| 电轴右偏什么意思| hmb是什么意思| 捡到狗狗代表什么预兆| 开除党籍有什么影响| 8月7号是什么星座| 手经常出汗是什么原因| 咳嗽呕吐是什么原因| 望尘莫及的及是什么意思| 吾儿是什么意思| 女命带驿马是什么意思| 脾肺气虚吃什么中成药| 鼻子上火吃什么药| 骨科什么意思| 苹果手机用的什么系统| 肚子不饿是什么原因| 戴帽子是什么意思| 胰岛素针头4mm和5mm有什么区别| 血脂高看什么科| 冬眠是什么意思| ntr什么意思| 梦见着火是什么意思| 下眼皮跳是什么原因| 下雨了是什么意思| 什么的目光| 咖啡对心脏有什么影响| 上房揭瓦是什么意思| 1985年什么命| 保释是什么意思| 身体水肿是什么原因引起的| 路痴是什么原因造成的| 心烦意乱吃什么药| 舌苔厚白吃什么药最好| ptsd是什么| 左舌根疼痛是什么情况| 什么是低钠盐| kcal是什么意思| 白条是什么| 阴阳失调是什么意思| 月子早餐吃什么好| 精分是什么意思| 肠镜前一天吃什么| 地中海贫血什么意思| 大姨妈喝什么好| cv是什么意思| 皮下出血小红点是什么原因造成的| 胸腔疼痛是什么原因| 癣是什么| 痔疮有什么影响| 吃什么润肺养肺最快| 玉米须能治什么病| 身体皮肤痒是什么原因| 杭州有什么| 杨梅不能和什么一起吃| 游园惊梦讲的是什么| 吃花生米是什么意思| 事后紧急避孕药什么时候吃有效| 有结石不能吃什么东西| 秦二世叫什么| 吃什么生血快| 梦见捉黄鳝是什么意思| 渚是什么意思| na医学上是什么意思| 10000mah是什么意思| 办理生育登记有什么用| 血清肌酐高说明什么问题| 胃不好能吃什么水果| 皮肤变黄是什么原因| 月经推后是什么原因| 鸡婆什么意思| 仔仔是什么意思| 心电图能检查出什么| 老面是什么面| 胎盘有什么用| 科长是什么级别| 28岁属相是什么生肖| 低压高吃什么食物好| 天天吹空调有什么危害| 晦气是什么意思| 草木皆兵是什么生肖| 螳螂是什么生肖| 什么叫hp感染| 治未病科是看什么病的| 深度睡眠是什么状态| 银属于五行属什么| 4月7日什么星座| 依稀是什么意思| 八股文是什么| 苔菜是什么菜图片| 什么地开放填空| 心里害怕紧张恐惧是什么症状| 脑梗前有什么征兆| cos是什么意思啊| 现在流行什么样的衣柜| 孕妇待产需要准备什么| 电气火灾用什么灭火器| 右肩膀疼是什么原因| reald厅什么意思| 什么是血脂| 什么花是红色的| 英语6级是什么水平| 耳朵长痣代表什么| 什么是胰岛素| 劳伦斯属于什么档次| 乳腺增生是什么症状| 1月6号什么星座| 做爱什么姿势最舒服| 不等是什么意思| 旱魃是什么| 十二指肠憩室是什么意思| 年底是什么时候| 什么是正方形| 淋漓不尽是什么意思| 抑郁症是什么症状| 倾注是什么意思| 儿童疝气挂什么科| 梦见火车脱轨什么预兆| 无穷是什么意思| 虾吃什么| 土地出让金是什么意思| 午夜是什么时候| 乙肝两对半阴性是什么意思| 全能教是什么| 用盐刷牙有什么好处和坏处| 耳朵响是什么原因| 肝胃不和吃什么药| 为什么拉屎会拉出血| 为什么要文化大革命| 肚脐左下方疼是什么原因| 什么是癌胚抗原| 身体出油多是什么原因| 元武道是什么| 水仙是什么茶| 人怕冷是什么原因引起的| 耳鸣是什么原因引起| 阴枣是什么| 高危型hpv52阳性是什么意思| 怀孕吃什么宝宝会白| 睾丸痛是什么原因| 6月30日是什么座| 血沉是什么| 日生组成什么字| 卟是什么意思| 消化内科是看什么病的| 脊柱侧弯拍什么片子| 脖子上长小肉疙瘩是什么原因| 皂基是什么| 栀子花黄叶是什么原因| 白带黄用什么药| 铲子是什么意思| e站是什么| 抗风疹病毒抗体igg高是什么意思| 第一磨牙什么时候换| 头孢是治疗什么的| 支原体感染吃什么药| 骨质疏松吃什么钙片好| 欲壑难填是什么意思| 脚趾头麻木是什么原因引起的| 4pcs是什么意思| 怀孕一个月什么症状| 大连机场叫什么| 淋巴结炎挂什么科| 九死一生什么生肖| 什么样的人容易猝死| 血压低是什么原因| 为什么会落枕| 呀啦嗦是什么意思| 百度Jump to content

昌图县人民法院:离婚纠纷争执多 法官调解续温情

From Wikipedia, the free encyclopedia
(Redirected from Daemon (computer software))
Components of some Linux desktop environments that are daemons include D-Bus, NetworkManager (here called unetwork), PulseAudio (usound), and Avahi.
百度 半岛电视台专访亚洲超级富豪女孩真人秀导演凯文·李,讲述中国那1%最富人士的故事。

In computing, a daemon is a program that runs as a background process, rather than being under the direct control of an interactive user. Customary convention is to name a daemon process with the letter d as a suffix to indicate that it's a daemon. For example, syslogd is a daemon that implements system logging facility, and sshd is a daemon that serves incoming SSH connections.

Even though the concept can apply to many computing systems, the term daemon is used almost exclusively in the context of Unix-based systems. In other contexts, different terms are used for the same concept.

Systems often start daemons at boot time that will respond to network requests, hardware activity, or other programs by performing some task. Daemons such as cron may also perform defined tasks at scheduled times.

Terminology

[edit]

In the context of computing, the word is generally pronounced either as /?di?m?n/ DEE-m?n or /?de?m?n/ DAY-m?n.[1]

The term was coined by the programmers at MIT's Project MAC. According to Fernando J. Corbató, who worked on Project MAC around 1963, his team was the first to use the term daemon, inspired by Maxwell's demon, an imaginary agent in physics and thermodynamics that helped to sort molecules, stating, "We fancifully began to use the word daemon to describe background processes that worked tirelessly to perform system chores".[2] Unix systems inherited this terminology. Maxwell's demon is consistent with Greek mythology's interpretation of a daemon as a supernatural being working in the background.

In the general sense, daemon is an older form of the word "demon", from the Greek δα?μων. In the Unix System Administration Handbook Evi Nemeth states the following about daemons:[3]

Many people equate the word "daemon" with the word "demon", implying some kind of satanic connection between UNIX and the underworld. This is an egregious misunderstanding. "Daemon" is actually a much older form of "demon"; daemons have no particular bias towards good or evil, but rather serve to help define a person's character or personality. The ancient Greeks' concept of a "personal daemon" was similar to the modern concept of a "guardian angel"—eudaemonia is the state of being helped or protected by a kindly spirit. As a rule, UNIX systems seem to be infested with both daemons and demons.

Alternative terms include service (used in Windows, from Windows NT onwards, and later also in Linux), started task (IBM z/OS),[4] and ghost job (XDS UTS). Sometimes the more general term server or server process is used, particularly for daemons that operate as part of client-server systems.[5] A daemon that connects to a computer network is a network service.

After the term was adopted for computer use, it was incorrectly[1] rationalized as a backronym for disk and execution monitor.[6][7][8]

Implementations

[edit]

Unix-like systems

[edit]

In a Unix-like system, the parent process of a daemon is often, but not always, the init process. A daemon is usually created either by the init process directly launching the daemon, by the daemon being run by an initialization script run by init, by the daemon being launched by a super-server launched by init.

The init process in Research Unix and BSD starts daemons from an initialization script. A daemon started as a command in an initialization script must either fork a child process and then immediately exit, or must be run as a background process using &, so that the shell running the initialization script can continue after starting the daemon. In the former case, the daemon process run from the shell exits, thus causing init to adopt the child process that runs as the daemon; in the latter case, when the shell running the initialization script exits, the child daemon process is adopted by init.[9]

The versions of init in System III and in System V can run arbitrary commands and can be configured to run them once or to restart them when they terminate.[10][11][12][13] The former mechanism can be used to run initialization scripts; daemons started from those scripts behave the same as in Research Unix and BSD. The latter mechanism can be used to run daemons directly from init.

A daemon can also be launched from a user's command line. However, daemons launched in that fashion typically must perform other operations, such as dissociating the process from any controlling terminal (tty). Such procedures are often implemented in various convenience routines such as daemon(3). A daemon launched by an initialization script need not do these steps, but doing so allows the daemon to be restarted by a user if it exits;[14] init itself would not restart them.[15] Operations such a daemon must do include:

  • Optionally removing unnecessary variables from environment.
  • Executing as a background task by forking and exiting (in the parent "half" of the fork). This allows daemon's parent (shell or startup process) to receive exit notification and continue its normal execution.
  • Detaching from the invoking session, usually accomplished by a single operation, setsid():
    • Dissociating from the controlling tty.
    • Creating a new session and becoming the session leader of that session.
    • Becoming a process group leader.
  • If the daemon wants to ensure that it will not acquire a new controlling tty even by accident (which happens when a session leader without a controlling tty opens a free tty), it may fork and exit again. This means that it is no longer a session leader in the new session, and cannot acquire a controlling tty.
  • Setting the root directory (/) as the current working directory so that the process does not keep any directory in use that may be on a mounted file system (allowing it to be unmounted).
  • Changing the umask to 0 to allow open(), creat(), and other operating system calls to provide their own permission masks and not to depend on the umask of the caller.
  • Redirecting file descriptors 0, 1 and 2 for the standard streams (stdin, stdout and stderr) to /dev/null or a logfile, and closing all the other file descriptors inherited from the parent process.

If the process is started by a super-server daemon, such as inetd, launchd, or systemd, the super-server daemon will perform those functions for the process,[16][17][18] except for old-style daemons not converted to run under systemd and specified as Type=forking[18] and "multi-threaded" datagram servers under inetd.[16]

MS-DOS

[edit]

In MS-DOS, daemon-like functionality was implemented as a terminate-and-stay-resident program (TSR).

Windows

[edit]

In Windows, a Windows service provides the functionality of a daemon. It runs as a process, usually does not interact with the user (i.e. via monitor, keyboard, or mouse) and may be launched by the operating system at boot time. In Windows 2000 and later versions, a Windows service is configured and controlled via various interfaces including the Control Panel, the Service Control Manager sc command, the net start and net stop commands, PowerShell, or a custom program.

However, any Windows application can perform the role of a daemon, not just a service, and some Windows daemons have the option of running as a normal process.

Mac

[edit]

In classic Mac OS, optional features and services were provided by system extensions and control panels – files loaded at startup time that patched the operating system. Later versions of classic Mac OS augmented these with faceless background applications: regular applications that ran in the background. To the user, these were still described as regular system extensions.

The more modern macOS, which is Unix-based, uses daemons but uses the term "services" to designate software that performs functions selected from the Services menu, rather than using that term for daemons, as Windows does.

See also

[edit]

References

[edit]
  1. ^ a b Eric S. Raymond. "daemon". The Jargon File. Retrieved 2025-08-05.
  2. ^ "The Origin of the word Daemon".
  3. ^ "The BSD Daemon". Freebsd.org. Retrieved 2025-08-05.
  4. ^ "Glossary of z/OS terms and abbreviations". IBM Documentation. IBM. 31 January 2006.
  5. ^ "sshd: OpenSSH server process | SSH Academy". www.ssh.com. Retrieved 2025-08-05.
  6. ^ "Daemon Definition". www.linfo.org.
  7. ^ "What is a daemon?". UCLA Knowledge Base.
  8. ^ "Daemon". Kayshav.com.
  9. ^ "(Unix) daemonization turns out to be quite old". October 3, 2024.
  10. ^ UNIX User's Manual, Release 3.0 (PDF). June 1980. INIT(8).
  11. ^ UNIX User's Manual, Release 3.0 (PDF). June 1980. INITTAB(5).
  12. ^ UNIX System Administrator's Manua Release 5.0 (PDF). June 1982. INIT(1M).
  13. ^ UNIX User's Manual System V (PDF). January 1983. INITTAB(4).
  14. ^ "Daemonization in Unix programs is probably about restarting programs". October 5, 2024.
  15. ^ "Traditionally, init on Unix was not a service manager as such". October 4, 2024.
  16. ^ a b inetd(8) – FreeBSD System Manager's Manual
  17. ^ launchd.plist(5) – Darwin and macOS File Formats Manual
  18. ^ a b "systemd.service". freedesktop.org. Retrieved August 25, 2012.
[edit]
白肺是什么 加息是什么意思 利润是什么 又热又冷是什么原因 蛇和什么相冲
荔枝有什么功效 为什么下雨会打雷 生活质量是什么意思 支那是什么意思 散光看东西是什么样的
火鸡面为什么这么贵 肾有问题挂什么科 哀莫大于心死什么意思 电磁炉滴滴响不加热是什么原因 鞑靼是什么意思
新生儿呛奶是什么原因引起的 冷血动物是什么意思 什么扑鼻 朋友开业送什么礼物好 县政府党组成员什么级别
过敏性鼻炎有什么症状hcv8jop8ns0r.cn saucony是什么品牌hcv8jop3ns5r.cn 墨水用什么能洗掉hcv7jop6ns7r.cn 花卉是什么意思hcv8jop8ns1r.cn 300分能上什么大学hcv8jop4ns7r.cn
减肥吃什么水果hcv8jop3ns2r.cn 什么掌不能拍hcv7jop5ns0r.cn 白发用什么染发最安全inbungee.com 什么狗聪明听话又好养gysmod.com 乳腺结节是什么hcv9jop6ns3r.cn
2014年五行属什么hcv9jop0ns6r.cn 咳嗽白痰吃什么好得快hcv8jop5ns3r.cn marni是什么牌子chuanglingweilai.com 知了为什么会叫hcv7jop4ns7r.cn 亚撒西是什么意思hcv7jop9ns9r.cn
晚上入睡困难是什么原因hcv8jop2ns3r.cn 肚脐周围是什么肠hcv7jop6ns2r.cn 红色象征什么hcv8jop9ns0r.cn 做腹部彩超挂什么科gangsutong.com 脸上掉皮是什么原因hcv8jop1ns9r.cn
百度