From ed03a59e66700eac9849be93821ca917db7a61b0 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Wed, 19 Aug 2020 23:59:12 +0200 Subject: [PATCH] Use a buffered channel for OS signals --- signals_unix.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/signals_unix.go b/signals_unix.go index 5d98b7e..ea1cddf 100644 --- a/signals_unix.go +++ b/signals_unix.go @@ -14,7 +14,7 @@ import ( // Argument output should be the file descriptor for the terminal; usually // os.Stdout. func listenForResize(output *os.File, msgs chan Msg, errs chan error) { - sig := make(chan os.Signal) + sig := make(chan os.Signal, 1) signal.Notify(sig, syscall.SIGWINCH) for { <-sig