Skip to content
Myr

Ignore SIGINT when running as proxy

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent 7205203 · Browse files · 1 file+2 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−0 removed

  • other:+2 added−0 removed

1 file+2 added−0 removed

modified:src/proxy.go+2 added
5 unmodified lines
6 "fmt"7 "io"8 "os"9 "os/exec"10 "os/signal"11 "path/filepath"12 "strings"13 "time"14
87 unmodified lines
102 temp := WriteTemporaryFile(append(exports, command), "\n")103 defer os.Remove(temp)104105 cmd := cmdBuilder(temp)106 signal.Ignore(os.Interrupt)107 if err := cmd.Run(); err != nil {108 if exitError, ok := err.(*exec.ExitError); ok {109 code := exitError.ExitCode()110 if code == ExitBecome {
24 unmodified lines