by [email protected]:
(Take this as LongTerm or Thinking)
It would be fine to have a fork and daemonize calls,
something like this:
func Daemonize()
{
os.Stdin.Close();
os.Stdout.Close();
os.Stderr.Close();
pid := Fork();
// In parent
if pid != 0 {
os.Exit(0);
}
// In child
syscall.Setsid()
....
}