How to create a daemon process in Golang?

Kasinath Kottukkal picture Kasinath Kottukkal · May 19, 2014 · Viewed 43.8k times · Source

Has anyone here written a deamon process in Golang? Can you walk me through how to do that? Useful links are welcome.

Answer

nemo picture nemo · May 19, 2014

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.