summaryrefslogtreecommitdiffhomepage
path: root/runsc/boot/fs.go
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2019-08-02 13:46:42 -0700
committergVisor bot <gvisor-bot@google.com>2019-08-02 13:47:55 -0700
commitb461be88a8036ca0455aceb8b6c723d6b6fded4f (patch)
treec4b7b4ce6b9163ef5fd326ed4245cce04aa4621b /runsc/boot/fs.go
parent2906dffcdbd4398361d5d7f718faa4f24fdc3b8e (diff)
Stops container if gofer is killed
Each gofer now has a goroutine that polls on the FDs used to communicate with the sandbox. The respective gofer is destroyed if any of the FDs is closed. Closes #601 PiperOrigin-RevId: 261383725
Diffstat (limited to 'runsc/boot/fs.go')
-rw-r--r--runsc/boot/fs.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/runsc/boot/fs.go b/runsc/boot/fs.go
index 98ce40991..b6eeacf98 100644
--- a/runsc/boot/fs.go
+++ b/runsc/boot/fs.go
@@ -476,9 +476,6 @@ func (p *podMountHints) findMount(mount specs.Mount) *mountHint {
}
type containerMounter struct {
- // cid is the container ID. May be set to empty for the root container.
- cid string
-
root *specs.Root
// mounts is the set of submounts for the container. It's a copy from the spec
@@ -493,9 +490,8 @@ type containerMounter struct {
hints *podMountHints
}
-func newContainerMounter(spec *specs.Spec, cid string, goferFDs []int, k *kernel.Kernel, hints *podMountHints) *containerMounter {
+func newContainerMounter(spec *specs.Spec, goferFDs []int, k *kernel.Kernel, hints *podMountHints) *containerMounter {
return &containerMounter{
- cid: cid,
root: spec.Root,
mounts: compileMounts(spec),
fds: fdDispenser{fds: goferFDs},