summaryrefslogtreecommitdiff
path: root/libpod/container_internal.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-03-13 12:03:07 -0700
committerGitHub <noreply@github.com>2019-03-13 12:03:07 -0700
commit22fc5a3e57566326b96f465e69e5566598666841 (patch)
treec20f71ed45950f2e0638c7321988c2f303fdd8ea /libpod/container_internal.go
parenta65788c8761f7a89be8ec6bd0fb547ec73f957f5 (diff)
parent3b5805d521b8fa8a948efe74133ad1148a4c180d (diff)
downloadpodman-22fc5a3e57566326b96f465e69e5566598666841.tar.gz
podman-22fc5a3e57566326b96f465e69e5566598666841.tar.bz2
podman-22fc5a3e57566326b96f465e69e5566598666841.zip
Merge pull request #2621 from mheon/event_on_death
Add event on container death
Diffstat (limited to 'libpod/container_internal.go')
-rw-r--r--libpod/container_internal.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index 330745314..bea7acd69 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -211,6 +211,9 @@ func (c *Container) handleExitFile(exitFile string, fi os.FileInfo) error {
c.state.Exited = true
+ // Write an event for the container's death
+ c.newContainerExitedEvent(c.state.ExitCode)
+
return nil
}
@@ -948,6 +951,8 @@ func (c *Container) start() error {
c.state.State = ContainerStateRunning
+ defer c.newContainerEvent(events.Start)
+
return c.save()
}