diff options
author | Matthew Heon <mheon@redhat.com> | 2020-10-13 14:00:35 -0400 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2020-10-13 14:21:19 -0400 |
commit | f58d2f5e75b4982774509847c18b39f4a50fd5be (patch) | |
tree | 53096a2bed60f6805ac0b25dcb297b7a0bd0078e /libpod/runtime.go | |
parent | 83e6e4ccdd925fa25500cff9e4b631b2c5d157cb (diff) | |
download | podman-f58d2f5e75b4982774509847c18b39f4a50fd5be.tar.gz podman-f58d2f5e75b4982774509847c18b39f4a50fd5be.tar.bz2 podman-f58d2f5e75b4982774509847c18b39f4a50fd5be.zip |
Enforce LIFO ordering for shutdown handlers
This allows us to run both the Libpod and Server handlers at the
same time without unregistering one.
Also, pass the signal that killed us into the handlers, in case
they want to use it to determine what to do (e.g. what exit code
to set).
Signed-off-by: Matthew Heon <mheon@redhat.com>
Diffstat (limited to 'libpod/runtime.go')
-rw-r--r-- | libpod/runtime.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/runtime.go b/libpod/runtime.go index 1118264f0..ccd920ab0 100644 --- a/libpod/runtime.go +++ b/libpod/runtime.go @@ -183,7 +183,7 @@ func newRuntimeFromConfig(ctx context.Context, conf *config.Config, options ...R return nil, err } - if err := shutdown.Register("libpod", func() error { + if err := shutdown.Register("libpod", func(sig os.Signal) error { os.Exit(1) return nil }); err != nil { |