PPID=1 runs as a background process, rather than being under the direct control of an interactive us

https://en.wikipedia.org/wiki/Daemon_(computing)php

【後臺進程,非互動】網絡

d 結尾ssh

syslogd 系統日誌記錄spa

sshd 響應ssh鏈接請求日誌

 

 

In multitasking computer operating systems, a daemon (/ˈdmən/ or /ˈdmən/)[1] is a computer program that runs as a background process, rather than being under the direct control of an interactive user. Traditionally, the process names of a daemon end with the letter d, for clarification that the process is, in fact, a daemon, and for differentiation between a daemon and a normal computer program. For example, syslogd is the daemon that implements the system logging facility, and sshd is a daemon that serves incoming SSH connections.orm

In a Unix environment, the parent process of a daemon is often, but not always, the init process. A daemon is usually either created by a process forking a child process and then immediately exiting, thus causing init to adopt the child process, or by the init process directly launching the daemon. In addition, a daemon launched by forking and exiting 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) in Unix.進程

【系統啓動時,啓動】ip

如對網絡請求、硬件活動的響應ci

Systems often start daemons at boot time which 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 timesterminal

zh.wikipedia.org/wiki/守護進程

在一個多工的電腦做業系統中,守護進程英語:daemon,/ˈdmən//ˈdmən/)是一種在後臺執行的電腦程序。此類程序會被以進程的形式初始化。守護進程程序的名稱一般以字母「d」結尾:例如,syslogd就是指管理系統日誌的守護進程。

一般,守護進程沒有任何存在的父進程(即PPID=1),且在UNIX系統進程層級中直接位於init之下。守護進程程序一般經過以下方法使本身成爲守護進程:對一個子進程執行fork,而後使其父進程當即終止,使得這個子進程能在init下運行。這種方法一般被稱爲「脫殼」。

系統一般在啓動時一同起動守護進程。守護進程爲對網絡請求,硬件活動等進行響應,或其餘經過某些任務對其餘應用程序的請求進行迴應提供支持。守護進程也可以對硬件進行配置(如在某些Linux系統上的devfsd),運行計劃任務(例如cron),以及運行其餘任務。

DOS環境中,此類應用程序被稱爲駐留程序(TSR)。在Windows系統中,由稱爲Windows服務的應用程序來履行守護進程的職責。

在本來的Mac OS系統中,此類應用程序被稱爲「extensions」。而做爲Unix-likeMac OS X有守護進程。(在Mac OS X中也有「服務」,但他們與Windows中相似的程序在概念上徹底不相同。)

相關文章
相關標籤/搜索