diff options
Diffstat (limited to 'vm/starnix/starnix.go')
| -rw-r--r-- | vm/starnix/starnix.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vm/starnix/starnix.go b/vm/starnix/starnix.go index a90cc9d96..c1921aff5 100644 --- a/vm/starnix/starnix.go +++ b/vm/starnix/starnix.go @@ -5,6 +5,7 @@ package starnix import ( "bytes" + "context" "encoding/json" "fmt" "io" @@ -403,7 +404,7 @@ func (inst *instance) Copy(hostSrc string) (string, error) { return vmDst, fmt.Errorf("instance %s: can't push binary %s to instance over scp", inst.name, base) } -func (inst *instance) Run(timeout time.Duration, stop <-chan bool, command string) ( +func (inst *instance) Run(ctx context.Context, command string) ( <-chan []byte, <-chan error, error) { rpipe, wpipe, err := osutil.LongPipe() if err != nil { @@ -430,8 +431,7 @@ func (inst *instance) Run(timeout time.Duration, stop <-chan bool, command strin return nil, nil, err } wpipe.Close() - return vmimpl.Multiplex(cmd, inst.merger, timeout, vmimpl.MultiplexConfig{ - Stop: stop, + return vmimpl.Multiplex(ctx, cmd, inst.merger, vmimpl.MultiplexConfig{ Debug: inst.debug, Scale: inst.timeouts.Scale, }) |
