Skip to content

Commit 7ac503d

Browse files
committed
kill.go: Remove unnecessary checks
... that prevent sending signals not mentioned in signal map. Currently these are SIGRTMIN..SIGRTMAX. Signed-off-by: Valentin Kulesh <[email protected]>
1 parent 9f9c962 commit 7ac503d

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

kill.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,7 @@ signal to the init process of the "ubuntu01" container:
6161
func parseSignal(rawSignal string) (syscall.Signal, error) {
6262
s, err := strconv.Atoi(rawSignal)
6363
if err == nil {
64-
sig := syscall.Signal(s)
65-
for _, msig := range signalMap {
66-
if sig == msig {
67-
return sig, nil
68-
}
69-
}
70-
return -1, fmt.Errorf("unknown signal %q", rawSignal)
64+
return syscall.Signal(s), nil
7165
}
7266
signal, ok := signalMap[strings.TrimPrefix(strings.ToUpper(rawSignal), "SIG")]
7367
if !ok {

0 commit comments

Comments
 (0)