Skip to content

Commit 361f9b7

Browse files
committed
Merge pull request opencontainers#550 from rajasec/restoretty
Adding tty closure for restore operation
2 parents 1a124e9 + a7ee55b commit 361f9b7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

restore.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,12 +135,14 @@ func restoreContainer(context *cli.Context, spec *specs.LinuxSpec, config *confi
135135
return -1, err
136136
}
137137
if err := container.Restore(process, options); err != nil {
138+
tty.Close()
138139
return -1, err
139140
}
140141
if pidFile := context.String("pid-file"); pidFile != "" {
141142
if err := createPidFile(pidFile, process); err != nil {
142143
process.Signal(syscall.SIGKILL)
143144
process.Wait()
145+
tty.Close()
144146
return -1, err
145147
}
146148
}

0 commit comments

Comments
 (0)