return chdir_;
}
-/* Normally, die_if_already_running() will terminate the program with a message
- * if a locked pidfile already exists. If this function is called,
- * die_if_already_running() will merely log a warning. */
+/* Normally, daemonize() or damonize_start() will terminate the program with a
+ * message if a locked pidfile already exists. If this function is called, an
+ * existing pidfile will be replaced, with a warning. */
void
ignore_existing_pidfile(void)
{
/* If a locked pidfile exists, issue a warning message and, unless
* ignore_existing_pidfile() has been called, terminate the program. */
-void
+static void
die_if_already_running(void)
{
pid_t pid;
/* Running in daemon process. */
}
+ die_if_already_running();
make_pidfile();
/* Make sure that the unixctl commands for vlog get registered in a