【问题标题】:Daemon vs process守护进程与进程
【发布时间】:2018-07-23 08:51:32
【问题描述】:

我对linux很陌生,所以不太了解daemon、前台进程和后台进程的区别。

据我了解:

  • Daemon 只是一个后台进程,它在后台运行,并以 init 作为其父进程。
  • 前台进程是我们简单地从控制台调用的进程。

那么,如果我在带有“daemon off”标志的 docker 容器中运行例如 nginx,这意味着 nginx 将成为在容器控制台中运行的前台进程?

【问题讨论】:

  • Yyyyyyyyyyyyes。
  • 谢谢))没想到我做对了)

标签: linux docker nginx


【解决方案1】:

究竟是什么问题?

  • 阅读this

    • To start a container in detached mode, you use -d=true or just -d option.
    • In foreground mode (the default when -d is not specified), docker run can start the process in the container and attach the console to the process’s standard input, output, and standard error.

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-02
    • 2011-10-06
    • 1970-01-01
    • 1970-01-01
    • 2011-03-06
    • 2011-02-27
    相关资源
    最近更新 更多