Minor fixes.

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
Toni Uhlig
2023-01-27 01:39:03 +01:00
parent 5e313f43f9
commit 58439a6761
3 changed files with 13 additions and 1 deletions

View File

@@ -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);