Browse code

Merge pull request #11295 from LK4D4/oom_after_dead

Check oom status after container stopped in lxc driver

Michael Crosby authored on 2015/03/17 06:16:47
Showing 1 changed files
... ...
@@ -256,16 +256,16 @@ func (d *driver) Run(c *execdriver.Command, pipes *execdriver.Pipes, startCallba
256 256
 
257 257
 	oomKill := false
258 258
 	oomKillNotification, err := notifyOnOOM(cgroupPaths)
259
+
260
+	<-waitLock
261
+
259 262
 	if err == nil {
260 263
 		_, oomKill = <-oomKillNotification
261 264
 		log.Debugf("oomKill error %s waitErr %s", oomKill, waitErr)
262
-
263 265
 	} else {
264 266
 		log.Warnf("Your kernel does not support OOM notifications: %s", err)
265 267
 	}
266 268
 
267
-	<-waitLock
268
-
269 269
 	// check oom error
270 270
 	exitCode := getExitCode(c)
271 271
 	if oomKill {