We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2964f03 commit ccf5d54Copy full SHA for ccf5d54
stubs/stub.go
@@ -12,6 +12,7 @@ import (
12
"log"
13
"os"
14
"os/exec"
15
+ "os/signal"
16
"path"
17
"path/filepath"
18
"regexp"
@@ -126,6 +127,18 @@ func main() {
126
127
command.Stdin = os.Stdin
128
command.Stdout = os.Stdout
129
command.Stderr = os.Stderr
130
+
131
+ // Pass signals through to the child process.
132
+ sigChan := make(chan os.Signal, 1)
133
+ signal.Notify(sigChan)
134
+ go func() {
135
+ for sig := range sigChan {
136
+ if command.Process != nil {
137
+ command.Process.Signal(sig)
138
+ }
139
140
+ }()
141
142
err = command.Run()
143
var exitError *exec.ExitError
144
if errors.As(err, &exitError) {
0 commit comments