diff options
author | Matthew Heon <matthew.heon@pm.me> | 2019-03-12 16:12:09 -0400 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2019-03-13 10:18:51 -0400 |
commit | 3b5805d521b8fa8a948efe74133ad1148a4c180d (patch) | |
tree | c5bfc0a0e48019e4dacda504532e1c6e00b60711 /libpod/container_internal.go | |
parent | 8b3f759800ebd6e53e0a807728ede633aa9bdb36 (diff) | |
download | podman-3b5805d521b8fa8a948efe74133ad1148a4c180d.tar.gz podman-3b5805d521b8fa8a948efe74133ad1148a4c180d.tar.bz2 podman-3b5805d521b8fa8a948efe74133ad1148a4c180d.zip |
Add event on container death
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'libpod/container_internal.go')
-rw-r--r-- | libpod/container_internal.go | 5 |
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() } |