Keep stdin open instead of opening when use it.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu
2017-11-09 09:28:30 +00:00
parent 2433ae7539
commit c4931c8409
4 changed files with 23 additions and 30 deletions

View File

@@ -202,7 +202,7 @@ func loadContainer(ctx context.Context, cntr containerd.Container, containerDir
// cri-containerd got restarted just during that. In that case, we still
// treat the container as `CREATED`.
containerIO, err = cio.NewContainerIO(id,
cio.WithStdin(meta.Config.GetStdin()),
cio.WithStdinOpen(meta.Config.GetStdin()),
cio.WithTerminal(meta.Config.GetTty()),
)
if err != nil {