Adding tty closure for restore operation

Signed-off-by: rajasec <rajasec79@gmail.com>
This commit is contained in:
rajasec 2016-02-10 09:48:12 +05:30
parent 1a124e9c2d
commit a7ee55b716
1 changed files with 2 additions and 0 deletions

View File

@ -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
}
}