Signed-off-by: Michael Crosby <michael@docker.com>
| ... | ... |
@@ -104,9 +104,7 @@ func (m *containerMonitor) reset(successful bool) {
|
| 104 | 104 |
container.stdin, container.stdinPipe = io.Pipe() |
| 105 | 105 |
} |
| 106 | 106 |
|
| 107 |
- if container.daemon != nil && container.daemon.srv != nil {
|
|
| 108 |
- container.LogEvent("die")
|
|
| 109 |
- } |
|
| 107 |
+ container.LogEvent("die")
|
|
| 110 | 108 |
|
| 111 | 109 |
c := container.command.Cmd |
| 112 | 110 |
|
| ... | ... |
@@ -160,6 +158,8 @@ func (m *containerMonitor) Start() error {
|
| 160 | 160 |
|
| 161 | 161 |
pipes := execdriver.NewPipes(m.container.stdin, m.container.stdout, m.container.stderr, m.container.Config.OpenStdin) |
| 162 | 162 |
|
| 163 |
+ m.container.LogEvent("start")
|
|
| 164 |
+ |
|
| 163 | 165 |
if exitStatus, err = m.container.daemon.Run(m.container, pipes, m.callback); err != nil {
|
| 164 | 166 |
utils.Errorf("Error running container: %s", err)
|
| 165 | 167 |
} |
| ... | ... |
@@ -36,7 +36,7 @@ func (daemon *Daemon) ContainerStart(job *engine.Job) engine.Status {
|
| 36 | 36 |
if err := container.Start(); err != nil {
|
| 37 | 37 |
return job.Errorf("Cannot start container %s: %s", name, err)
|
| 38 | 38 |
} |
| 39 |
- container.LogEvent("start")
|
|
| 39 |
+ |
|
| 40 | 40 |
return engine.StatusOK |
| 41 | 41 |
} |
| 42 | 42 |
|