mirror of https://github.com/containers/podman.git
Wipe PID and ConmonPID in state after container stops
Matches the behavior of Docker. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
This commit is contained in:
parent
a1bb1987cc
commit
38c6199b80
|
@ -1044,6 +1044,8 @@ func (c *Container) stop(timeout uint) error {
|
|||
return err
|
||||
}
|
||||
|
||||
c.state.PID = 0
|
||||
c.state.ConmonPID = 0
|
||||
c.state.StoppedByUser = true
|
||||
if err := c.save(); err != nil {
|
||||
return errors.Wrapf(err, "error saving container %s state after stopping", c.ID())
|
||||
|
|
|
@ -234,6 +234,8 @@ func (r *OCIRuntime) updateContainerStatus(ctr *Container, useRuntime bool) erro
|
|||
|
||||
// Alright, it exists. Transition to Stopped state.
|
||||
ctr.state.State = define.ContainerStateStopped
|
||||
ctr.state.PID = 0
|
||||
ctr.state.ConmonPID = 0
|
||||
|
||||
// Read the exit file to get our stopped time and exit code.
|
||||
return ctr.handleExitFile(exitFile, info)
|
||||
|
|
Loading…
Reference in New Issue