From a7ee55b71692dc05cdfbd559d4bf7641e5b4e812 Mon Sep 17 00:00:00 2001 From: rajasec Date: Wed, 10 Feb 2016 09:48:12 +0530 Subject: [PATCH] Adding tty closure for restore operation Signed-off-by: rajasec --- restore.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/restore.go b/restore.go index a0dae2d2..067c13d3 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 } }