podman/pkg/api
Paul Holzinger 0bbef4b830
libpod: rework shutdown handler flow
Currently podman run -d can exit 0 if we send SIGTERM during startup
even though the contianer was never started. That just doesn't make any
sense is horribly confusing for a external job manager like systemd.

The original motivation was to exit 0 for the podman.service in commit
ca7376bb11. That does make sense but it should only do so for the
service and only if the server did indeed gracefully shutdown.

So we rework how the exit logic works, do not let the handler perform
the exit. Instead the shutdown package does the exit after all handlers
are run, this solves the issue of ordering. Then we default to exit code
1 like we did before and allow the service exit handler to overwrite the
exit code 0 in case of a graceful shutdown.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-09-26 16:14:30 +02:00
..
handlers Merge pull request #23857 from rhatdan/run 2024-09-17 20:31:28 +00:00
server libpod: rework shutdown handler flow 2024-09-26 16:14:30 +02:00
types set !remote build tags where needed 2024-08-19 11:41:28 +02:00
Makefile swagger: exlude new docker network types 2024-07-12 14:19:37 +02:00
tags.yaml [CI:DOCS] Set all operation id to be compatibile 2021-04-05 19:54:30 -07:00