*/
/** \file daemon.c Some helpers for programs that detach from the console. */
-#include "para.h"
-#include "daemon.h"
+
+#include <regex.h>
#include <pwd.h>
#include <sys/types.h> /* getgrnam() */
#include <grp.h>
+#include "para.h"
+#include "daemon.h"
#include "string.h"
#include "color.h"
}
/**
- * Supress log messages with severity lower than the given loglevel.
+ * Suppress log messages with severity lower than the given loglevel.
*
* \param loglevel The smallest level that should be logged.
*/
goto err;
if (chdir("/") < 0)
goto err;
- umask(0);
null = open("/dev/null", O_RDONLY);
if (null < 0)
goto err;
* set_or_get equal to \p UPTIME_GET return the uptime.
* \return Zero if called with \a set_or_get equal to \p UPTIME_SET, the number
- * of seconds ellapsed since the last reset otherwise.
+ * of seconds elapsed since the last reset otherwise.
*
* \sa time(2), difftime(3).
*/