What are the behavioral differences between a daemon and a normal process?

后端 未结 3 1043
天涯浪人
天涯浪人 2021-02-01 06:39

I know that daemons run in the background mostly i.e. they require very less interaction from the user.

Wikipedia lists some of the types of daemons that commonly exist:

3条回答
  •  情深已故
    2021-02-01 07:10

    The question is a little vague, but I'll try anyways:

    Technically, daemons are just processes like any other. They usually, but are not required to, have misc file descriptors closed and other behavior suited for processes that live a long time. For a high level look at how most daemon processes are set up (in Python), check out: http://www.noah.org/wiki/Daemonize_Python

    So the differences really come down to lifecycle and users. Daemon processes live for long periods of time, usually as long as a given runlevel. They also usually provide services to other system-wide processes, or processes higher up than the average user run process..

提交回复
热议问题