Shutdown console after process exits

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2017-08-02 15:02:52 -04:00
parent 8b0a040004
commit bf4838eb71
2 changed files with 7 additions and 12 deletions

View File

@@ -229,6 +229,7 @@ func (p *initProcess) SetExited(status int) {
p.mu.Lock()
p.status = status
p.exited = time.Now()
p.platform.shutdownConsole(context.Background(), p.console)
p.mu.Unlock()
}
@@ -241,9 +242,6 @@ func (p *initProcess) Delete(context context.Context) error {
return fmt.Errorf("cannot delete a running container")
}
p.killAll(context)
if err := p.platform.shutdownConsole(context, p.console); err != nil {
log.G(context).WithError(err).Warn("Failed to shutdown container console")
}
p.Wait()
err = p.runtime.Delete(context, p.id, nil)
if p.io != nil {