summaryrefslogtreecommitdiffhomepage
path: root/runsc/boot
diff options
context:
space:
mode:
authorAndrei Vagin <avagin@google.com>2019-06-24 21:43:14 -0700
committergVisor bot <gvisor-bot@google.com>2019-06-24 21:44:27 -0700
commitfd16a329ce0c9fa1e7dd4c0fc1edc201f4c19571 (patch)
tree416f77c16bf0a39b0b7f6495dc80184f153b99ea /runsc/boot
parente9ea7230f7dc70d3e1bb5ae32b6927209cafb465 (diff)
fsgopher: reopen files via /proc/self/fd
When we reopen file by path, we can't be sure that we will open exactly the same file. The file can be deleted and another one with the same name can be created. PiperOrigin-RevId: 254898594
Diffstat (limited to 'runsc/boot')
-rw-r--r--runsc/boot/loader_test.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/runsc/boot/loader_test.go b/runsc/boot/loader_test.go
index 4af45bfcc..eca592e5b 100644
--- a/runsc/boot/loader_test.go
+++ b/runsc/boot/loader_test.go
@@ -37,6 +37,9 @@ import (
func init() {
log.SetLevel(log.Debug)
rand.Seed(time.Now().UnixNano())
+ if err := fsgofer.OpenProcSelfFD(); err != nil {
+ panic(err)
+ }
}
func testConfig() *Config {