mirror of
https://github.com/containers/podman.git
synced 2025-10-16 18:53:19 +08:00
cmd: call shutdown handler stop function
it is needed to wait for the handlers if they are currently being processed. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
@ -16,6 +16,7 @@ import (
|
|||||||
"github.com/containers/podman/v5/cmd/podman/registry"
|
"github.com/containers/podman/v5/cmd/podman/registry"
|
||||||
"github.com/containers/podman/v5/cmd/podman/validate"
|
"github.com/containers/podman/v5/cmd/podman/validate"
|
||||||
"github.com/containers/podman/v5/libpod/define"
|
"github.com/containers/podman/v5/libpod/define"
|
||||||
|
"github.com/containers/podman/v5/libpod/shutdown"
|
||||||
"github.com/containers/podman/v5/pkg/bindings"
|
"github.com/containers/podman/v5/pkg/bindings"
|
||||||
"github.com/containers/podman/v5/pkg/checkpoint/crutils"
|
"github.com/containers/podman/v5/pkg/checkpoint/crutils"
|
||||||
"github.com/containers/podman/v5/pkg/domain/entities"
|
"github.com/containers/podman/v5/pkg/domain/entities"
|
||||||
@ -124,6 +125,8 @@ func Execute() {
|
|||||||
fmt.Fprintln(os.Stderr, formatError(err))
|
fmt.Fprintln(os.Stderr, formatError(err))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_ = shutdown.Stop()
|
||||||
|
|
||||||
if requireCleanup {
|
if requireCleanup {
|
||||||
// The cobra post-run is not being executed in case of
|
// The cobra post-run is not being executed in case of
|
||||||
// a previous error, so make sure that the engine(s)
|
// a previous error, so make sure that the engine(s)
|
||||||
|
Reference in New Issue
Block a user