Open mably opened 9 years ago
From @peerchemist on December 1, 2014 21:55
It seems that systemd can take care of it, just in different fasion that most of deamons. It needs to be started without Type=forking due to this:
Because the Type=forking services expect the parent service to exit before the service has actually started. If the parent never exits, then systemctl start will not give you back a prompt because it doesn't think that it's done executing.
So very minimal systemd .service file will take care of your Go program. No need to think for it, it is magic.
From @mably on December 1, 2014 21:25
https://github.com/sevlyar/go-daemon https://github.com/VividCortex/godaemon
https://github.com/fiorix/go-daemon
http://blog.burntsushi.net/golang-daemonize-bsd
https://code.google.com/p/go/issues/detail?id=227
Copied from original issue: mably/ppcd#7