#include "daemon.h"
#include <errno.h>
#include <fcntl.h>
+#include <signal.h>
#include <stdlib.h>
#include <string.h>
+#include <sys/resource.h>
#include <sys/wait.h>
#include <unistd.h>
#include "command-line.h"
#include "socket-util.h"
#include "timeval.h"
#include "util.h"
-
-#define THIS_MODULE VLM_daemon
#include "vlog.h"
+VLOG_DEFINE_THIS_MODULE(daemon)
+
/* Should we run in the background? */
static bool detach;
}
make_pidfile();
+
+ /* Make sure that the unixctl commands for vlog get registered in a
+ * daemon, even before the first log message. */
+ vlog_init();
}
/* If daemonization is configured, then this function notifies the parent