Set state running before dumping to disk

Fixes #4766
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Upstream-commit: 97a38079010bddfe6316c4087c13825fd8df64b7
Component: engine
This commit is contained in:
Alexandr Morozov
2014-07-10 13:19:18 +04:00
committed by LK4D4
parent 0dcc4f93ce
commit 5ddda4b09a

View File

@ -1102,10 +1102,10 @@ func (container *Container) waitForStart() error {
c.Close()
}
}
if err := container.toDisk(); err != nil {
container.State.SetRunning(command.Pid())
if err := container.ToDisk(); err != nil {
utils.Debugf("%s", err)
}
container.State.SetRunning(command.Pid())
}
// We use a callback here instead of a goroutine and an chan for