Skip to content

Commit 5e18bd5

Browse files
committed
fix(cmd/testnetify): use syscall to self signal exit
Signed-off-by: Artur Troian <[email protected]>
1 parent aef7c5a commit 5e18bd5

File tree

2 files changed

+3
-25
lines changed

2 files changed

+3
-25
lines changed

.goreleaser.yaml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -80,25 +80,6 @@ builds:
8080
- "{{ .Env.STRIP_FLAGS }}"
8181
- "-linkmode={{ .Env.LINKMODE }}"
8282
- -extldflags "-lc -lrt -lpthread --static"
83-
- id: akash-windows-amd64
84-
binary: akash
85-
main: ./cmd/akash
86-
goarch:
87-
- amd64
88-
goos:
89-
- windows
90-
env:
91-
- CC=x86_64-w64-mingw32-gcc
92-
- CXX=x86_64-w64-mingw32-g++
93-
flags:
94-
- "-mod={{ .Env.MOD }}"
95-
- "-tags={{ .Env.BUILD_TAGS }}"
96-
- -trimpath
97-
- -buildmode=exe
98-
ldflags:
99-
- "{{ .Env.BUILD_VARS }}"
100-
- "{{ .Env.STRIP_FLAGS }}"
101-
- "-linkmode={{ .Env.LINKMODE }}"
10283
universal_binaries:
10384
- id: akash-darwin-universal
10485
ids:
@@ -112,7 +93,6 @@ archives:
11293
- akash-darwin-universal
11394
- akash-linux-amd64
11495
- akash-linux-arm64
115-
- akash-windows-amd64
11696
name_template: "akash_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
11797
wrap_in_directory: false
11898
formats:
@@ -124,7 +104,6 @@ archives:
124104
- akash-darwin-universal
125105
- akash-linux-amd64
126106
- akash-linux-arm64
127-
- akash-windows-amd64
128107
name_template: "akash_{{ .Os }}_{{ .Arch }}"
129108
wrap_in_directory: false
130109
formats:

cmd/akash/cmd/testnetify/testnetify.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"fmt"
77
"io"
88
"os"
9-
"os/signal"
109
"path/filepath"
1110
"sort"
1211
"strings"
@@ -163,9 +162,9 @@ you want to test the upgrade handler itself.
163162

164163
go func() {
165164
defer func() {
166-
sigChan := make(chan os.Signal, 1)
167-
signal.Notify(sigChan, os.Interrupt)
168-
sigChan <- os.Interrupt
165+
if proc, err := os.FindProcess(os.Getpid()); err == nil {
166+
_ = proc.Signal(os.Interrupt)
167+
}
169168
}()
170169
ctx := cmd.Context()
171170

0 commit comments

Comments
 (0)