Skip to content

Commit a7ee55b

Browse files
committed
Adding tty closure for restore operation
Signed-off-by: rajasec <[email protected]>
1 parent 1a124e9 commit a7ee55b

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)