mirror of
https://github.com/junegunn/fzf
synced 2026-07-20 16:33:18 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user