diff --git a/daemon_linux.go b/daemon_linux.go
index <HASH>..<HASH> 100644
--- a/daemon_linux.go
+++ b/daemon_linux.go
@@ -76,7 +76,7 @@ func Daemonize(child ...bool) {
 	os.Chdir("/")
 	syscall.Umask(0)
 
-	if len(child) == 0 || !child[0] {
+	if len(child) == 0 || child[0] {
 		resetEnv()
 	}
 }
Fix condition not matching documentation

The condition on child was inverted, so that Daemonize(true) was NOT
resetting the variable, contrary to what the documentation states.