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