summaryrefslogtreecommitdiff
path: root/libpod/container_internal.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2019-07-02 19:10:51 -0400
committerMatthew Heon <matthew.heon@pm.me>2019-07-02 19:10:51 -0400
commit38c6199b80c5de5d965ab1bcf05820567a36813c (patch)
tree4482ee00d2ecbed1edbdf978f749226e9722afa7 /libpod/container_internal.go
parenta1bb1987cc78dead96ef84086020f74b7c44c700 (diff)
downloadpodman-38c6199b80c5de5d965ab1bcf05820567a36813c.tar.gz
podman-38c6199b80c5de5d965ab1bcf05820567a36813c.tar.bz2
podman-38c6199b80c5de5d965ab1bcf05820567a36813c.zip
Wipe PID and ConmonPID in state after container stops
Matches the behavior of Docker. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'libpod/container_internal.go')
-rw-r--r--libpod/container_internal.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index 29df233b0..cb6c35049 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -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())