mirror of
https://github.com/containers/podman.git
synced 2025-07-15 03:02:52 +08:00
Record whether the container has exited
Use this to supplement exit codes returned from containers, to make sure we know when exit codes are invalid (as the container has not yet exited) Signed-off-by: Matthew Heon <mheon@redhat.com>
This commit is contained in:
@ -586,6 +586,8 @@ func (c *Container) reinit(ctx context.Context) error {
|
||||
// Set and save now to make sure that, if the init() below fails
|
||||
// we still have a valid state
|
||||
c.state.State = ContainerStateConfigured
|
||||
c.state.ExitCode = 0
|
||||
c.state.Exited = false
|
||||
if err := c.save(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user