diff --git a/admin.go b/admin.go index ad24e5d..5115971 100644 --- a/admin.go +++ b/admin.go @@ -125,7 +125,7 @@ func adminscreen() { } defer restore() go func() { - sig := make(chan os.Signal) + sig := make(chan os.Signal, 1) signal.Notify(sig, os.Interrupt) <-sig restore() diff --git a/util.go b/util.go index 6919296..f709513 100644 --- a/util.go +++ b/util.go @@ -90,7 +90,7 @@ func initdb() { os.Remove(dbname) os.Exit(1) }() - c := make(chan os.Signal) + c := make(chan os.Signal, 1) signal.Notify(c, os.Interrupt) go func() { <-c @@ -209,7 +209,7 @@ func adduser() { defer func() { os.Exit(1) }() - c := make(chan os.Signal) + c := make(chan os.Signal, 1) signal.Notify(c, os.Interrupt) go func() { <-c @@ -263,7 +263,7 @@ func chpass(username string) { defer func() { os.Exit(1) }() - c := make(chan os.Signal) + c := make(chan os.Signal, 1) signal.Notify(c, os.Interrupt) go func() { <-c diff --git a/web.go b/web.go index 11d1876..0cf5364 100644 --- a/web.go +++ b/web.go @@ -2567,7 +2567,7 @@ var readyalready = make(chan bool) var workinprogress = 0 func enditall() { - sig := make(chan os.Signal) + sig := make(chan os.Signal, 1) signal.Notify(sig, syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT) <-sig ilog.Printf("stopping...")