Refactor container io code

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu
2017-11-10 18:34:09 +00:00
parent b6de04772d
commit e41b6d3c24
8 changed files with 400 additions and 402 deletions

View File

@@ -121,9 +121,7 @@ func (c *criContainerdService) startContainer(ctx context.Context,
if err := cio.WithOutput("log", stdoutWC, stderrWC)(cntr.IO); err != nil {
return nil, fmt.Errorf("failed to add container log: %v", err)
}
if err := cntr.IO.Pipe(); err != nil {
return nil, fmt.Errorf("failed to pipe container io: %v", err)
}
cntr.IO.Pipe()
return cntr.IO, nil
}