aboutsummaryrefslogtreecommitdiff
path: root/cli_args.go
diff options
context:
space:
mode:
authorSebastian Lackner2019-01-05 15:44:32 +0100
committerJakob Unterwurzacher2019-01-05 16:12:16 +0100
commit7e05e809b7579ad0473fff6ce466c19d417d4e93 (patch)
treef4ba0f8b29c2a1ac7595b544a335db3aa32d75ed /cli_args.go
parentad15ad99856f90f3a72be4bd22ce44338645c963 (diff)
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).
Diffstat (limited to 'cli_args.go')
-rw-r--r--cli_args.go5
1 files changed, 5 insertions, 0 deletions
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"