summaryrefslogtreecommitdiff
path: root/libpod/container_inspect.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-02-27 13:51:43 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-03-01 21:17:51 +0000
commit8b87a17f569010d694a124848d1489f8c1430516 (patch)
tree0b9a389f40f1ccbeb142635f84fadfdd66e4e5db /libpod/container_inspect.go
parentaea4f24919dcf5797f046465958c082ac3cba730 (diff)
downloadpodman-8b87a17f569010d694a124848d1489f8c1430516.tar.gz
podman-8b87a17f569010d694a124848d1489f8c1430516.tar.bz2
podman-8b87a17f569010d694a124848d1489f8c1430516.zip
Add tracking for exec session IDs
Exec sessions now have an ID generated and assigned to their PID and stored in the database state. This allows us to track what exec sessions are currently active. Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #412 Approved by: baude
Diffstat (limited to 'libpod/container_inspect.go')
-rw-r--r--libpod/container_inspect.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/libpod/container_inspect.go b/libpod/container_inspect.go
index 124126708..de5770f8f 100644
--- a/libpod/container_inspect.go
+++ b/libpod/container_inspect.go
@@ -20,6 +20,11 @@ func (c *Container) getContainerInspectData(size bool, driverData *inspect.Data)
args = args[1:]
}
+ execIDs := []string{}
+ for id, _ := range c.state.ExecSessions {
+ execIDs = append(execIDs, id)
+ }
+
data := &inspect.ContainerInspectData{
ID: config.ID,
Created: config.CreatedTime,
@@ -50,7 +55,7 @@ func (c *Container) getContainerInspectData(size bool, driverData *inspect.Data)
MountLabel: config.MountLabel,
ProcessLabel: spec.Process.SelinuxLabel,
AppArmorProfile: spec.Process.ApparmorProfile,
- ExecIDs: []string{}, //TODO
+ ExecIDs: execIDs,
GraphDriver: driverData,
Mounts: spec.Mounts,
NetworkSettings: &inspect.NetworkSettings{