On 11/10/16 18:09, Tong Sun wrote:
> I've searched the mlist archive and have learned that I should
> avoid daemonize as much as possible. So instead of label my program as a
> daemon (or singleton or anything), let me describe what I need to do. 
> 
> I need the program (say, named as`myprog`) to fork into the background
> (if possible) with the "start" command-line option.

You could try this

https://github.com/sevlyar/go-daemon

This implements the daemonization by re-running the executable with an
environment variable.

-- 
Nick Craig-Wood <n...@craig-wood.com> -- http://www.craig-wood.com/nick

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to