dup2(null_fd, STDOUT_FILENO);
dup2(null_fd, STDERR_FILENO);
}
+
+ /* Disable logging to stderr to avoid wasting CPU time. */
+ vlog_set_levels(NULL, VLF_CONSOLE, VLL_EMER);
}
/* If daemonization is configured, then starts daemonization, by forking and
* pidfile locked, and only that process has the right to unlink it. */
if (!delete_if_stale) {
error = ESRCH;
- VLOG_WARN("%s: pid file is stale", pidfile);
+ VLOG_DBG("%s: pid file is stale", pidfile);
goto error;
}