summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/main.go b/main.go
index 9034e3f..7a29e68 100644
--- a/main.go
+++ b/main.go
@@ -159,9 +159,11 @@ func main() {
args := parseCliArgs()
- // Fork a child into the background if "-f" is not set AND we are mounting a filesystem
+ // Fork a child into the background if "-f" is not set AND we are mounting
+ // a filesystem. The child will do all the work.
if !args.foreground && flagSet.NArg() == 2 {
- forkChild() // does not return
+ ret := forkChild()
+ os.Exit(ret)
}
if args.debug {
tlog.Debug.Enabled = true