all repos — honk @ 332213347afb163a6f299e30aec463739e06c8af

my fork of honk

go vet claims we need a buffered chan for signal
Ted Unangst tedu@tedunangst.com
Sun, 02 Jul 2023 14:08:26 -0400
commit

332213347afb163a6f299e30aec463739e06c8af

parent

de65aea018a12e3716e8d169e130d95a8df0b17b

3 files changed, 5 insertions(+), 5 deletions(-)

jump to
M admin.goadmin.go

@@ -125,7 +125,7 @@ C.tcsetattr(1, C.TCSAFLUSH, savedtio)

} defer restore() go func() { - sig := make(chan os.Signal) + sig := make(chan os.Signal, 1) signal.Notify(sig, os.Interrupt) <-sig restore()
M util.goutil.go

@@ -90,7 +90,7 @@ defer func() {

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 @@ db := opendatabase()

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 @@ }

defer func() { os.Exit(1) }() - c := make(chan os.Signal) + c := make(chan os.Signal, 1) signal.Notify(c, os.Interrupt) go func() { <-c
M web.goweb.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...")