diff --git a/sys/sys.go b/sys/sys.go index 666cca4..09c5120 100644 --- a/sys/sys.go +++ b/sys/sys.go @@ -110,9 +110,7 @@ func HandleTermChange() { }() } -func HandleSigKill() { - done := make(chan os.Signal, 1) - defer close(done) +func HandleSigKill(done chan os.Signal) { signal.Notify(done, syscall.SIGINT, syscall.SIGTERM) go func() { <-done // Will block here until user hits ctrl+c