X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=daemon.c;h=0bc4b116e621726a0f1cb963436881c94fa4e6bc;hp=cae63ea7f48488124085d79360458ee44b5620a8;hb=dd462c7e1b61864d6da01a877ced78dab72e2244;hpb=00e4d4da1b2c00da139b09d3ed4ab9ad9fba2691 diff --git a/daemon.c b/daemon.c index cae63ea7..0bc4b116 100644 --- a/daemon.c +++ b/daemon.c @@ -5,12 +5,14 @@ */ /** \file daemon.c Some helpers for programs that detach from the console. */ -#include "para.h" -#include "daemon.h" + +#include #include #include /* getgrnam() */ #include +#include "para.h" +#include "daemon.h" #include "string.h" #include "color.h" @@ -103,7 +105,7 @@ void daemon_set_logfile(char *logfile_name) } /** - * 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. */ @@ -167,7 +169,6 @@ void daemonize(void) goto err; if (chdir("/") < 0) goto err; - umask(0); null = open("/dev/null", O_RDONLY); if (null < 0) goto err; @@ -284,7 +285,7 @@ void drop_privileges_or_die(const char *username, const char *groupname) * 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). */