aboutsummaryrefslogtreecommitdiff
path: root/utils.c
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2023-01-27 12:48:20 +0100
committerToni Uhlig <matzeton@googlemail.com>2023-01-27 12:48:20 +0100
commit23816f14036a46d0a43d6fa7f004d6a00542b6c3 (patch)
tree63b41abbdc1ef2cd1a8a47ccf963c0f3015d9572 /utils.c
parent42aad33ec83137a95fb45292cf7c4e4300634fa5 (diff)
Revert "Revert "Minor fixes.""
This reverts commit 42aad33ec83137a95fb45292cf7c4e4300634fa5.
Diffstat (limited to 'utils.c')
-rw-r--r--utils.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/utils.c b/utils.c
index fbdc2b79e..486387cb9 100644
--- a/utils.c
+++ b/utils.c
@@ -144,6 +144,12 @@ int daemonize_with_pidfile(char const * const pidfile)
if (daemonize != 0)
{
+ if (pidfile == NULL)
+ {
+ logger_early(1, "%s", "Missing pidfile.");
+ return 1;
+ }
+
if (is_daemon_running(pidfile, ps) != 0)
{
logger_early(1, "Pidfile %s found and daemon %s still running", pidfile, ps);