使用 python,守护进程
好吧,我已经查看了 python-daemon,还查看了各种其他与守护进程相关的代码配方。是否有任何“hello world”教程可以帮助我开始使用基于 python 的守护进程?
Okay I have looked at python-daemon, and also at various other daemon related code recipes. Are there any 'hello world' tutorials out there that can help me get started using a python based daemonized process?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
PEP 3143 包含几个 示例,其中最简单的一个是:
这看起来很简单。如果有不清楚的地方,请提出具体问题。
The PEP 3143 contains several examples, the simplest one of which is:
This seems as straightforward as it gets. If there's something that's unclear, please pose specific questions.
使用 subprocess.Popen,您可以启动另一个进程,该进程将在当前进程中生存...
在 python 控制台中运行:
杀死您的控制台,查看现有进程,睡眠还活着...
Using subprocess.Popen, you can launch another process that will survive your current process...
In a python console run :
Kill your console, look at existing processes, sleep is alive...