aboutsummaryrefslogtreecommitdiff
path: root/libpod/container_internal.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_internal.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_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 37a70a152..61f3410c9 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -100,6 +100,11 @@ func (c *Container) attachSocketPath() string {
return filepath.Join(c.runtime.ociRuntime.socketsDir, c.ID(), "attach")
}
+// Get PID file path for a container's exec session
+func (c *Container) execPidPath(sessionID string) string {
+ return filepath.Join(c.state.RunDir, "exec_pid_" + sessionID)
+}
+
// Sync this container with on-disk state and runc status
// Should only be called with container lock held
// This function should suffice to ensure a container's state is accurate and