summaryrefslogtreecommitdiffhomepage
path: root/runsc/boot/loader.go
diff options
context:
space:
mode:
authorKevin Krakauer <krakauer@google.com>2018-09-18 13:21:13 -0700
committerShentubot <shentubot@google.com>2018-09-18 13:22:26 -0700
commit7e00f3705480313a63c9db7d087db711abc720bc (patch)
tree29e658ff1ef4a3e13296d0dde861e56a79cf9861 /runsc/boot/loader.go
parented08597d121a624592e5517a28ae40ddbcc59cb0 (diff)
Automated rollback of changelist 213307171
PiperOrigin-RevId: 213504354 Change-Id: Iadd42f0ca4b7e7a9eae780bee9900c7233fb4f3f
Diffstat (limited to 'runsc/boot/loader.go')
-rw-r--r--runsc/boot/loader.go18
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,