diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-04-13 21:57:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-13 21:57:39 +0200 |
commit | 0b067b67e6fa9e7ce8c1b460f5347c8ae89d1ecb (patch) | |
tree | 6d777c6e7bf9d542633a936a0bb03decceaeaaa8 /pkg/signal/signal_linux.go | |
parent | d7695dd957b162ed24c807dc91200fe1abaecff1 (diff) | |
parent | 90ead05903e9c42758c1052c2ee623dca8de5e98 (diff) | |
download | podman-0b067b67e6fa9e7ce8c1b460f5347c8ae89d1ecb.tar.gz podman-0b067b67e6fa9e7ce8c1b460f5347c8ae89d1ecb.tar.bz2 podman-0b067b67e6fa9e7ce8c1b460f5347c8ae89d1ecb.zip |
Merge pull request #5800 from baude/v2edtests
Fixes for load and other system tests
Diffstat (limited to 'pkg/signal/signal_linux.go')
-rw-r--r-- | pkg/signal/signal_linux.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pkg/signal/signal_linux.go b/pkg/signal/signal_linux.go index 76ab16ec7..e6e0f1ca1 100644 --- a/pkg/signal/signal_linux.go +++ b/pkg/signal/signal_linux.go @@ -129,14 +129,15 @@ func StopCatch(sigc chan os.Signal) { // ParseSignalNameOrNumber translates a string to a valid syscall signal. Input // can be a name or number representation i.e. "KILL" "9" func ParseSignalNameOrNumber(rawSignal string) (syscall.Signal, error) { - s, err := ParseSignal(rawSignal) + basename := strings.TrimPrefix(rawSignal, "-") + s, err := ParseSignal(basename) if err == nil { return s, nil } for k, v := range signalMap { - if k == strings.ToUpper(rawSignal) { + if k == strings.ToUpper(basename) { return v, nil } } - return -1, fmt.Errorf("invalid signal: %s", rawSignal) + return -1, fmt.Errorf("invalid signal: %s", basename) } |