Permalink
Browse files

kill.go: Remove unnecessary checks

... that prevent sending signals not mentioned in signal map.
Currently these are SIGRTMIN..SIGRTMAX.

Signed-off-by: Valentin Kulesh <valentin.kulesh@virtuozzo.com>
  • Loading branch information...
unshare committed Jan 26, 2018
1 parent 9f9c962 commit 7ac503d1a2135dcf985677a0f8ea6950d9935e9e
Showing with 1 addition and 7 deletions.
  1. +1 −7 kill.go
View
@@ -61,13 +61,7 @@ signal to the init process of the "ubuntu01" container:
func parseSignal(rawSignal string) (syscall.Signal, error) {
s, err := strconv.Atoi(rawSignal)
if err == nil {
sig := syscall.Signal(s)
for _, msig := range signalMap {
if sig == msig {
return sig, nil
}
}
return -1, fmt.Errorf("unknown signal %q", rawSignal)
return syscall.Signal(s), nil
}
signal, ok := signalMap[strings.TrimPrefix(strings.ToUpper(rawSignal), "SIG")]
if !ok {

0 comments on commit 7ac503d

Please sign in to comment.