diff options
author | Matthew Heon <matthew.heon@gmail.com> | 2018-06-21 11:09:17 -0400 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-06-22 19:26:46 +0000 |
commit | c3602075ec6ee535e2fbf3e4fcf2ecbd27fa22c9 (patch) | |
tree | 80330aed0ce1e21103307be4dd6d1d7afeb49c14 /libpod/runtime.go | |
parent | d2f981fd0babda31c89ac031dabc671d76b8f25a (diff) | |
download | podman-c3602075ec6ee535e2fbf3e4fcf2ecbd27fa22c9.tar.gz podman-c3602075ec6ee535e2fbf3e4fcf2ecbd27fa22c9.tar.bz2 podman-c3602075ec6ee535e2fbf3e4fcf2ecbd27fa22c9.zip |
Make CGroups cleanup optional on whether they exist
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Closes: #981
Approved by: baude
Diffstat (limited to 'libpod/runtime.go')
-rw-r--r-- | libpod/runtime.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libpod/runtime.go b/libpod/runtime.go index 46d5a95ee..21dd9d024 100644 --- a/libpod/runtime.go +++ b/libpod/runtime.go @@ -570,14 +570,20 @@ func (r *Runtime) refresh(alivePath string) error { return errors.Wrapf(err, "error retrieving all pods from state") } for _, ctr := range ctrs { + ctr.lock.Lock() if err := ctr.refresh(); err != nil { + ctr.lock.Unlock() return err } + ctr.lock.Unlock() } for _, pod := range pods { + pod.lock.Lock() if err := pod.refresh(); err != nil { + pod.lock.Unlock() return err } + pod.lock.Unlock() } // Create a file indicating the runtime is alive and ready |