This commit is contained in:
chrislusf
2015-10-19 22:03:18 -07:00
parent faaf44f171
commit 805740069a
2 changed files with 19 additions and 20 deletions

View File

@@ -11,7 +11,7 @@ import (
func OnInterrupt(fn func()) {
// deal with control+c,etc
signalChan := make(chan os.Signal, 1)
// controlling terminal close, daemon not exit
// controlling terminal close, daemon not exit
signal.Ignore(syscall.SIGHUP)
signal.Notify(signalChan,
os.Interrupt,