aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-09-20 19:49:44 +0200
committerJakob Unterwurzacher2016-09-25 16:43:17 +0200
commit9ad49088fa7b919cee850818b61ad1d6bc5d3df3 (patch)
tree2ed9dee89c495f3c29f4c4532a782a5357ff727e /main.go
parentd9db75ebd263510dfcf93853f0e111012b82f828 (diff)
main: add explicit exit after forkChild
Trying to make it more obvious what is happening.
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