From 7e05e809b7579ad0473fff6ce466c19d417d4e93 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sat, 5 Jan 2019 15:44:32 +0100 Subject: main: Run 'ensure fds' code early during the program startup. The files are apparently processed in alphabetic order, so cli_args.go is processed before main.go. In order to run before the go-fuse imports, put the 'ensure fds' code in a separate package. Debug messages are omitted to avoid additional imports (that might contain other code messing up our file descriptors). --- cli_args.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cli_args.go') diff --git a/cli_args.go b/cli_args.go index b3f2834..a4da85c 100644 --- a/cli_args.go +++ b/cli_args.go @@ -1,5 +1,10 @@ package main +// Should be initialized before anything else. +// This import line MUST be in the alphabitcally first source code file of +// package main! +import _ "github.com/rfjakob/gocryptfs/internal/ensurefds012" + import ( "flag" "fmt" -- cgit v1.2.3