summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-03-16 17:23:50 -0400
committerGitHub <noreply@github.com>2022-03-16 17:23:50 -0400
commitb1d37a7e21bfb3e12af2e7cee25dc88ac4f148dd (patch)
tree6f14fd9263a1f221238b45b31f428decac52ba4b /libpod
parentfa33f3527f14edbf7407ba3ba482ef839debfb39 (diff)
parent1387b5bd8a639fcc0c9f9e78cda2aee7bac61b7d (diff)
downloadpodman-b1d37a7e21bfb3e12af2e7cee25dc88ac4f148dd.tar.gz
podman-b1d37a7e21bfb3e12af2e7cee25dc88ac4f148dd.tar.bz2
podman-b1d37a7e21bfb3e12af2e7cee25dc88ac4f148dd.zip
Merge pull request #13450 from jwhonce/bz/2052697
Exit code change BZ #2052697
Diffstat (limited to 'libpod')
-rw-r--r--libpod/runtime.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/libpod/runtime.go b/libpod/runtime.go
index d19997709..07653217a 100644
--- a/libpod/runtime.go
+++ b/libpod/runtime.go
@@ -210,6 +210,10 @@ func newRuntimeFromConfig(ctx context.Context, conf *config.Config, options ...R
}
if err := shutdown.Register("libpod", func(sig os.Signal) error {
+ // For `systemctl stop podman.service` support, exit code should be 0
+ if sig == syscall.SIGTERM {
+ os.Exit(0)
+ }
os.Exit(1)
return nil
}); err != nil && errors.Cause(err) != shutdown.ErrHandlerExists {