如何在Golang中创建一个守护进程? [英] How to create a daemon process in Golang?
本文介绍了如何在Golang中创建一个守护进程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这里有人在Golang写了一个deamon过程吗?你能否告诉我如何做到这一点?欢迎使用有用的链接。
Has anyone here written a deamon process in Golang? Can you walk me through how to do that? Useful links are welcome.
推荐答案
是的,这已完成。请参阅 go-daemon 项目。请注意,在 goroutines启动后发生守护进程时存在某些问题。详情请参阅 issue 227 。
Yes this has been done. See the go-daemon project. Be aware that there are certain problems when the daemonization happens after goroutines are launched. See issue 227 for details.
目前我建议使用您的操作系统为您提供的实用程序。有关解决方法,请参阅此相关问题 。
At this time I'd recommend to use the utilities your operating system offers you. See this related question for solutions.
这篇关于如何在Golang中创建一个守护进程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文