From baf227f5dd653818cedfb3f5f5b9349d64ac424d Mon Sep 17 00:00:00 2001 From: folbrich Date: Sat, 14 Feb 2026 10:13:23 +0100 Subject: [PATCH] Use buffered channels for SIGHUP signals --- cmd/desync/main.go | 2 +- cmd/desync/mount-index.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/desync/main.go b/cmd/desync/main.go index d384f4a..298e0bb 100644 --- a/cmd/desync/main.go +++ b/cmd/desync/main.go @@ -19,7 +19,7 @@ var ( stderr io.Writer = os.Stderr ) -var sighup = make(chan os.Signal) +var sighup = make(chan os.Signal, 1) func main() { // Install a signal handler for SIGINT or SIGTERM to cancel a context in diff --git a/cmd/desync/mount-index.go b/cmd/desync/mount-index.go index 9ac7003..f5d89ff 100644 --- a/cmd/desync/mount-index.go +++ b/cmd/desync/mount-index.go @@ -123,7 +123,7 @@ func runMountIndex(ctx context.Context, opt mountIndexOptions, args []string) er } // Save state file on SIGHUP - sighup := make(chan os.Signal) + sighup := make(chan os.Signal, 1) signal.Notify(sighup, syscall.SIGHUP) go func() { for range sighup {