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

Move container start event into monitor

Signed-off-by: Michael Crosby <michael@docker.com>
This commit is contained in:
Michael Crosby 2014-08-07 10:50:25 -07:00
parent b7550cd456
commit 6ae05936e1
2 changed files with 4 additions and 4 deletions

View file

@ -104,9 +104,7 @@ func (m *containerMonitor) reset(successful bool) {
container.stdin, container.stdinPipe = io.Pipe()
}
if container.daemon != nil && container.daemon.srv != nil {
container.LogEvent("die")
}
container.LogEvent("die")
c := container.command.Cmd
@ -160,6 +158,8 @@ func (m *containerMonitor) Start() error {
pipes := execdriver.NewPipes(m.container.stdin, m.container.stdout, m.container.stderr, m.container.Config.OpenStdin)
m.container.LogEvent("start")
if exitStatus, err = m.container.daemon.Run(m.container, pipes, m.callback); err != nil {
utils.Errorf("Error running container: %s", err)
}

View file

@ -36,7 +36,7 @@ func (daemon *Daemon) ContainerStart(job *engine.Job) engine.Status {
if err := container.Start(); err != nil {
return job.Errorf("Cannot start container %s: %s", name, err)
}
container.LogEvent("start")
return engine.StatusOK
}