diff --git a/restore.go b/restore.go index a0dae2d2f..067c13d3c 100644 --- a/restore.go +++ b/restore.go @@ -135,12 +135,14 @@ func restoreContainer(context *cli.Context, spec *specs.LinuxSpec, config *confi return -1, err } if err := container.Restore(process, options); err != nil { + tty.Close() return -1, err } if pidFile := context.String("pid-file"); pidFile != "" { if err := createPidFile(pidFile, process); err != nil { process.Signal(syscall.SIGKILL) process.Wait() + tty.Close() return -1, err } }