summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils.c b/utils.c
index fc0472b7c..7f6665d1a 100644
--- a/utils.c
+++ b/utils.c
@@ -197,7 +197,7 @@ int change_user_group(char const * const user,
return -errno;
}
}
- if (pidfile != NULL)
+ if (daemonize != 0 && pidfile != NULL)
{
errno = 0;
if (chown(pidfile, pwd->pw_uid, gid) != 0)