aboutsummaryrefslogtreecommitdiff
path: root/daemonize.go
diff options
context:
space:
mode:
Diffstat (limited to 'daemonize.go')
-rw-r--r--daemonize.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/daemonize.go b/daemonize.go
index e227942..5d570c6 100644
--- a/daemonize.go
+++ b/daemonize.go
@@ -6,6 +6,8 @@ import (
"os/exec"
"os/signal"
"syscall"
+
+ "github.com/rfjakob/gocryptfs/internal/toggledlog"
)
// The child sends us USR1 if the mount was successful
@@ -30,7 +32,7 @@ func forkChild() {
c.Stdin = os.Stdin
err := c.Start()
if err != nil {
- fmt.Printf("forkChild: starting %s failed: %v\n", name, err)
+ toggledlog.Fatal.Printf("forkChild: starting %s failed: %v\n", name, err)
os.Exit(1)
}
err = c.Wait()
@@ -40,7 +42,7 @@ func forkChild() {
os.Exit(waitstat.ExitStatus())
}
}
- fmt.Printf("forkChild: wait returned an unknown error: %v\n", err)
+ toggledlog.Fatal.Printf("forkChild: wait returned an unknown error: %v\n", err)
os.Exit(1)
}
// The child exited with 0 - let's do the same.