From 552158f3ad8c92cfd36bf299db280228acba2fcb Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Wed, 22 May 2024 20:01:37 +0900 Subject: [PATCH] Ignore SIGINT when running as proxy --- src/proxy.go | 2 ++ 1 file changed, 2 insertions(+) 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()