bump go-runc to 706de6f422f397fb70b8c98f9b8c8eab2de32ae2

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby 2017-01-26 13:54:48 -08:00
parent b59bd59d8a
commit ead53658cc
2 changed files with 20 additions and 3 deletions

View File

@ -1,5 +1,5 @@
# go-runc client for runc; master as of 01/20/2017
github.com/crosbymichael/go-runc d300412371ca6865a40bd4559599bb370889e2aa
github.com/crosbymichael/go-runc 706de6f422f397fb70b8c98f9b8c8eab2de32ae2
# console pkg;
github.com/crosbymichael/console 4bf9d88357031b516b3794a2594b6d060a29c59c
# go-metrics client to prometheus; master as of 12/16/2016

View File

@ -193,10 +193,27 @@ func (r *Runc) Exec(context context.Context, id string, spec specs.Process, opts
args = append(args, oargs...)
}
cmd := r.command(context, append(args, id)...)
if opts != nil {
if opts != nil && opts.IO != nil {
opts.Set(cmd)
}
return runOrError(cmd)
if cmd.Stdout == nil && cmd.Stderr == nil {
data, err := cmd.CombinedOutput()
if err != nil {
return fmt.Errorf("%s: %s", err, data)
}
return nil
}
if err := cmd.Start(); err != nil {
return err
}
if opts != nil && opts.IO != nil {
if c, ok := opts.IO.(StartCloser); ok {
if err := c.CloseAfterStart(); err != nil {
return err
}
}
}
return cmd.Wait()
}
// Run runs the create, start, delete lifecycle of the container