diff options
author | Paul Holzinger <pholzing@redhat.com> | 2022-05-23 19:37:13 +0200 |
---|---|---|
committer | Paul Holzinger <pholzing@redhat.com> | 2022-05-24 17:56:37 +0200 |
commit | 70f147d0190e566d68412430c47df9bc00ddd418 (patch) | |
tree | ff611d182178b79779d45894c513c5ecce08a4bb /pkg/signal/signal_linux.go | |
parent | 7391bdfbbc418adbc85f6643cb67cdbd87fd0b7b (diff) | |
download | podman-70f147d0190e566d68412430c47df9bc00ddd418.tar.gz podman-70f147d0190e566d68412430c47df9bc00ddd418.tar.bz2 podman-70f147d0190e566d68412430c47df9bc00ddd418.zip |
cmd/podman/common/completion.go: fix FIXMEs
There is no good way to recommend labels for podman container runlabel.
Add the missing max-size log option. These are the only documented
options so the completion should not suggest something different.
Add proper --stop-signal completion. It will now complete all supported
signal names both upper and lowercase depending on the user input. Also
it work with and without the SIG prefix.
Fixing the TODOs in this file are more complicated since they describe
bigger features.
[NO NEW TESTS NEEDED]
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'pkg/signal/signal_linux.go')
-rw-r--r-- | pkg/signal/signal_linux.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/signal/signal_linux.go b/pkg/signal/signal_linux.go index 21e09c9fe..a114ea019 100644 --- a/pkg/signal/signal_linux.go +++ b/pkg/signal/signal_linux.go @@ -23,8 +23,8 @@ const ( SIGWINCH = syscall.SIGWINCH // For cross-compilation with Windows ) -// signalMap is a map of Linux signals. -var signalMap = map[string]syscall.Signal{ +// SignalMap is a map of Linux signals. +var SignalMap = map[string]syscall.Signal{ "ABRT": unix.SIGABRT, "ALRM": unix.SIGALRM, "BUS": unix.SIGBUS, @@ -94,8 +94,8 @@ var signalMap = map[string]syscall.Signal{ // CatchAll catches all signals and relays them to the specified channel. func CatchAll(sigc chan os.Signal) { - handledSigs := make([]os.Signal, 0, len(signalMap)) - for _, s := range signalMap { + handledSigs := make([]os.Signal, 0, len(SignalMap)) + for _, s := range SignalMap { handledSigs = append(handledSigs, s) } signal.Notify(sigc, handledSigs...) |