Skip to content

Instantly share code, notes, and snippets.

@mac01021
Created March 29, 2014 13:53
Show Gist options
  • Select an option

  • Save mac01021/9854850 to your computer and use it in GitHub Desktop.

Select an option

Save mac01021/9854850 to your computer and use it in GitHub Desktop.
func Daemonize() {
go func() {
fmt.Println("Daemonizing...")
ch := make(chan os.Signal, 1)
signal.Notify(ch, os.Signal(syscall.SIGHUP))
for _ = range ch {
}
}()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment