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中相似的程序在概念上彻底不相同。)

相关文章
相关标签/搜索