summaryrefslogtreecommitdiff
path: root/libpod/finished_amd64.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2017-11-21 13:44:22 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2017-11-21 20:09:09 +0000
commit8e76ebcf6e8925d5fa6a8c9ab517d665b44c7b63 (patch)
treecd9c15e37a00927ccd8c31b3cde40f46fe82b736 /libpod/finished_amd64.go
parent7b736e333315e6f533b9677712a0c2e037cc293b (diff)
downloadpodman-8e76ebcf6e8925d5fa6a8c9ab517d665b44c7b63.tar.gz
podman-8e76ebcf6e8925d5fa6a8c9ab517d665b44c7b63.tar.bz2
podman-8e76ebcf6e8925d5fa6a8c9ab517d665b44c7b63.zip
Add ability to update container status from runc
Wire this in to all state-bound container operations to ensure syncronization of container state. Also exposes PID of running containers via API. Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #56 Approved by: rhatdan
Diffstat (limited to 'libpod/finished_amd64.go')
-rw-r--r--libpod/finished_amd64.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/libpod/finished_amd64.go b/libpod/finished_amd64.go
new file mode 100644
index 000000000..11dbc9181
--- /dev/null
+++ b/libpod/finished_amd64.go
@@ -0,0 +1,16 @@
+// +build !arm,!386
+
+package libpod
+
+import (
+ "os"
+ "syscall"
+ "time"
+)
+
+// Get the created time of a file
+// Only works on 64-bit OSes
+func getFinishedTime(fi os.FileInfo) time.Time {
+ st := fi.Sys().(*syscall.Stat_t)
+ return time.Unix(st.Ctim.Sec, st.Ctim.Nsec)
+}