diff options
Diffstat (limited to 'runsc/boot/loader.go')
-rw-r--r-- | runsc/boot/loader.go | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/runsc/boot/loader.go b/runsc/boot/loader.go index faaf3e800..623d04171 100644 --- a/runsc/boot/loader.go +++ b/runsc/boot/loader.go @@ -79,11 +79,8 @@ type Loader struct { watchdog *watchdog.Watchdog - // stdioFDs contains stdin, stdout, and stderr. - stdioFDs []int - - // goferFDs are the FDs that attach the sandbox to the gofers. - goferFDs []int + // ioFDs are the FDs that attach the sandbox to the gofers. + ioFDs []int // spec is the base configuration for the root container. spec *specs.Spec @@ -143,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(spec *specs.Spec, conf *Config, controllerFD, deviceFD int, goferFDs []int, console bool) (*Loader, error) { +func New(spec *specs.Spec, conf *Config, controllerFD, deviceFD int, ioFDs []int, console bool) (*Loader, error) { if err := usage.Init(); err != nil { return nil, fmt.Errorf("Error setting up memory usage: %v", err) } @@ -277,8 +274,7 @@ func New(spec *specs.Spec, conf *Config, controllerFD, deviceFD int, goferFDs [] conf: conf, console: console, watchdog: watchdog, - stdioFDs: []int{syscall.Stdin, syscall.Stdout, syscall.Stderr}, - goferFDs: goferFDs, + ioFDs: ioFDs, spec: spec, startSignalForwarding: startSignalForwarding, rootProcArgs: procArgs, @@ -390,8 +386,7 @@ func (l *Loader) run() error { &l.rootProcArgs, l.spec, l.conf, - l.stdioFDs, - l.goferFDs, + l.ioFDs, l.console, l.rootProcArgs.Credentials, l.rootProcArgs.Limits, @@ -479,8 +474,7 @@ func (l *Loader) startContainer(k *kernel.Kernel, spec *specs.Spec, conf *Config &procArgs, spec, conf, - ioFDs[:3], // stdioFDs - ioFDs[3:], // goferFDs + ioFDs, false, creds, procArgs.Limits, |