Revert "Revert "Minor fixes.""

This reverts commit 42aad33ec8.
This commit is contained in:
Toni Uhlig
2023-01-27 12:48:20 +01:00
parent 42aad33ec8
commit 23816f1403
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);