mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-11-25 14:17:40 +00:00
Ignore SIGINT when running as proxy
This commit is contained in:
parent
7205203dc8
commit
552158f3ad
@ -7,6 +7,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
|
"os/signal"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
@ -102,6 +103,7 @@ func runProxy(commandPrefix string, cmdBuilder func(temp string) *exec.Cmd, opts
|
|||||||
defer os.Remove(temp)
|
defer os.Remove(temp)
|
||||||
|
|
||||||
cmd := cmdBuilder(temp)
|
cmd := cmdBuilder(temp)
|
||||||
|
signal.Ignore(os.Interrupt)
|
||||||
if err := cmd.Run(); err != nil {
|
if err := cmd.Run(); err != nil {
|
||||||
if exitError, ok := err.(*exec.ExitError); ok {
|
if exitError, ok := err.(*exec.ExitError); ok {
|
||||||
code := exitError.ExitCode()
|
code := exitError.ExitCode()
|
||||||
|
Loading…
Reference in New Issue
Block a user