From e7f6433109fad4762379aed88ae70da36805f198 Mon Sep 17 00:00:00 2001 From: Alexander Morozov Date: Thu, 29 Jan 2015 14:50:42 -0800 Subject: [PATCH] Remove explicit setting of ExitCode That will be set in defer anyway. Also there was race between setting ExitCode and inspect. Signed-off-by: Alexander Morozov --- daemon/monitor.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/daemon/monitor.go b/daemon/monitor.go index 9e7d3062f..8cfa2d79d 100644 --- a/daemon/monitor.go +++ b/daemon/monitor.go @@ -168,12 +168,10 @@ func (m *containerMonitor) Start() error { // we need to check this before reentering the loop because the waitForNextRestart could have // been terminated by a request from a user if m.shouldStop { - m.container.ExitCode = exitStatus.ExitCode return err } continue } - m.container.ExitCode = exitStatus.ExitCode if exitStatus.OOMKilled { m.container.LogEvent("oom") }