// with code 1.
func TrapSignal(cb func()) {
c := make(chan os.Signal, 1)
- signal.Notify(c, os.Interrupt, syscall.SIGTERM)
+ signal.Notify(c, os.Interrupt, os.Kill, syscall.SIGHUP, syscall.SIGINT, syscall.SIGQUIT, syscall.SIGTERM, syscall.SIGKILL)
go func() {
for sig := range c {
fmt.Printf("captured %v, exiting...\n", sig)