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
This commit is contained in:
Junegunn Choi
2026-07-20 13:12:12 +09:00
parent dc384afb70
commit 235a726fae
+1
View File
@@ -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