summaryrefslogtreecommitdiff
path: root/libpod/oci.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-02-27 22:52:28 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-03-01 21:17:51 +0000
commitfa5f99effa7dd2ef9fbd5287b6225590b28713d1 (patch)
tree240a4696de8a499ed7489b67fcbdf4674ca87d19 /libpod/oci.go
parent83d7ae6506f7aaf1f7d543412a148b4bf4cd6657 (diff)
downloadpodman-fa5f99effa7dd2ef9fbd5287b6225590b28713d1.tar.gz
podman-fa5f99effa7dd2ef9fbd5287b6225590b28713d1.tar.bz2
podman-fa5f99effa7dd2ef9fbd5287b6225590b28713d1.zip
Convert exec session tracking to use a dedicated struct
This will behave better if we need to add anything to it at a later date - we can add fields to the struct without breaking existing BoltDB databases. Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #412 Approved by: baude
Diffstat (limited to 'libpod/oci.go')
-rw-r--r--libpod/oci.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/libpod/oci.go b/libpod/oci.go
index 63aff9487..ef32079f9 100644
--- a/libpod/oci.go
+++ b/libpod/oci.go
@@ -571,7 +571,8 @@ func (r *OCIRuntime) execStopContainer(ctr *Container, timeout uint) error {
// Get a list of active exec sessions
execSessions := []int{}
- for _, pid := range ctr.state.ExecSessions {
+ for _, session := range ctr.state.ExecSessions {
+ pid := session.PID
// Ping the PID with signal 0 to see if it still exists
if err := unix.Kill(pid, 0); err == unix.ESRCH {
continue