1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Check oom status after container stopped in lxc driver

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
This commit is contained in:
Alexander Morozov 2015-03-10 13:45:13 -07:00
parent 13bfbfc84b
commit d59212e605

View file

@ -256,16 +256,16 @@ func (d *driver) Run(c *execdriver.Command, pipes *execdriver.Pipes, startCallba
oomKill := false oomKill := false
oomKillNotification, err := notifyOnOOM(cgroupPaths) oomKillNotification, err := notifyOnOOM(cgroupPaths)
<-waitLock
if err == nil { if err == nil {
_, oomKill = <-oomKillNotification _, oomKill = <-oomKillNotification
log.Debugf("oomKill error %s waitErr %s", oomKill, waitErr) log.Debugf("oomKill error %s waitErr %s", oomKill, waitErr)
} else { } else {
log.Warnf("WARNING: Your kernel does not support OOM notifications: %s", err) log.Warnf("WARNING: Your kernel does not support OOM notifications: %s", err)
} }
<-waitLock
// check oom error // check oom error
exitCode := getExitCode(c) exitCode := getExitCode(c)
if oomKill { if oomKill {