summaryrefslogtreecommitdiffhomepage
path: root/runsc/boot
diff options
context:
space:
mode:
Diffstat (limited to 'runsc/boot')
-rw-r--r--runsc/boot/loader.go6
-rw-r--r--runsc/boot/loader_test.go3
2 files changed, 5 insertions, 4 deletions
diff --git a/runsc/boot/loader.go b/runsc/boot/loader.go
index 766a2e968..726482bb2 100644
--- a/runsc/boot/loader.go
+++ b/runsc/boot/loader.go
@@ -140,7 +140,7 @@ func init() {
// New initializes a new kernel loader configured by spec.
// New also handles setting up a kernel for restoring a container.
-func New(id string, spec *specs.Spec, conf *Config, controllerFD, deviceFD int, goferFDs []int, console bool) (*Loader, error) {
+func New(id string, spec *specs.Spec, conf *Config, controllerFD, deviceFD int, goferFDs []int, stdioFDs []int, console bool) (*Loader, error) {
if err := usage.Init(); err != nil {
return nil, fmt.Errorf("Error setting up memory usage: %v", err)
}
@@ -279,9 +279,9 @@ func New(id string, spec *specs.Spec, conf *Config, controllerFD, deviceFD int,
conf: conf,
console: console,
watchdog: watchdog,
- stdioFDs: []int{syscall.Stdin, syscall.Stdout, syscall.Stderr},
- goferFDs: goferFDs,
spec: spec,
+ goferFDs: goferFDs,
+ stdioFDs: stdioFDs,
startSignalForwarding: startSignalForwarding,
rootProcArgs: procArgs,
sandboxID: id,
diff --git a/runsc/boot/loader_test.go b/runsc/boot/loader_test.go
index 0b363253d..ea8411a8b 100644
--- a/runsc/boot/loader_test.go
+++ b/runsc/boot/loader_test.go
@@ -101,7 +101,8 @@ func createLoader() (*Loader, func(), error) {
return nil, nil, err
}
- l, err := New("foo", spec, conf, fd, -1 /* device fd */, []int{sandEnd}, false)
+ stdio := []int{int(os.Stdin.Fd()), int(os.Stdout.Fd()), int(os.Stderr.Fd())}
+ l, err := New("foo", spec, conf, fd, -1 /* device fd */, []int{sandEnd}, stdio, false)
if err != nil {
cleanup()
return nil, nil, err