Created
June 29, 2013 05:25
Revisions
-
andelf created this gist
Jun 29, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ // program package main import "os/signal" import "os" import "fmt" import "syscall" import "time" func main() { c := make(chan os.Signal, 1) signal.Notify(c, syscall.SIGHUP) go func(){ for sig := range c { println(sig) fmt.Printf("Got A HUP Signal! Now Reloading Conf....\n") } }() for { time.Sleep(1000 * time.Millisecond) fmt.Printf(">>") } }