summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2024-05-22 20:01:37 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2024-05-22 20:01:37 +0900
commit552158f3ad8c92cfd36bf299db280228acba2fcb (patch)
treed170a20926cc4c86ed64984ef4877bc0e3921bef /src
parent7205203dc80e74e4053ba3225ca2fcb83a902cb5 (diff)
downloadfzf-552158f3ad8c92cfd36bf299db280228acba2fcb.tar.gz
Ignore SIGINT when running as proxy
Diffstat (limited to 'src')
-rw-r--r--src/proxy.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/proxy.go b/src/proxy.go
index a1e8f805..65a56604 100644
--- a/src/proxy.go
+++ b/src/proxy.go
@@ -7,6 +7,7 @@ import (
"io"
"os"
"os/exec"
+ "os/signal"
"path/filepath"
"strings"
"time"
@@ -102,6 +103,7 @@ func runProxy(commandPrefix string, cmdBuilder func(temp string) *exec.Cmd, opts
defer os.Remove(temp)
cmd := cmdBuilder(temp)
+ signal.Ignore(os.Interrupt)
if err := cmd.Run(); err != nil {
if exitError, ok := err.(*exec.ExitError); ok {
code := exitError.ExitCode()