diff options
author | Brent Baude <bbaude@redhat.com> | 2020-04-13 10:53:24 -0500 |
---|---|---|
committer | Brent Baude <bbaude@redhat.com> | 2020-04-13 13:08:04 -0500 |
commit | 90ead05903e9c42758c1052c2ee623dca8de5e98 (patch) | |
tree | 60fc9e4b574c4b2d927c62907e27e7902440a51f /pkg/signal/signal_linux.go | |
parent | 465b4bc563b274ec166868aae079a65ee0284b1d (diff) | |
download | podman-90ead05903e9c42758c1052c2ee623dca8de5e98.tar.gz podman-90ead05903e9c42758c1052c2ee623dca8de5e98.tar.bz2 podman-90ead05903e9c42758c1052c2ee623dca8de5e98.zip |
Fixes for load and other system tests
Signed-off-by: Brent Baude <bbaude@redhat.com>
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) } |