From 235a726fae89bec3ac6d3e7facd2716d78bb625d Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Mon, 20 Jul 2026 13:12:12 +0900 Subject: [PATCH] Unregister interrupt signal handler when Loop exits Registration persisted across Run() calls, so host program using fzf as library would keep trapping SIGINT/SIGTERM/SIGHUP after fzf finished --- src/terminal.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/terminal.go b/src/terminal.go index 02563bc5..5211a1fa 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -6187,6 +6187,7 @@ func (t *Terminal) Loop() error { for { select { case <-ctx.Done(): + signal.Stop(intChan) return case s := <-intChan: // Don't quit by SIGINT while executing because it should be for the executing command and not for fzf itself