X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=daemon.c;h=94c4a8cba6b9aae8646491f3eeddfff016914c7b;hp=316432e68a5f116c9f2035d9bfb661b99b7061a1;hb=c27a8644af6d285ca6bfd39be9b923ef9f911f78;hpb=3943f98061a55f373991ecb2e4429ec02baf0555 diff --git a/daemon.c b/daemon.c index 316432e6..94c4a8cb 100644 --- a/daemon.c +++ b/daemon.c @@ -199,7 +199,7 @@ void daemonize(bool parent_waits) goto err; if (chdir("/") < 0) goto err; - null = open("/dev/null", O_RDONLY); + null = open("/dev/null", O_RDWR); if (null < 0) goto err; if (dup2(null, STDIN_FILENO) < 0) @@ -249,11 +249,15 @@ void daemon_open_log_or_die(void) /** * Log the startup message containing the paraslash version. + * + * \param name The name of the executable. + * + * First the given \a name is prefixed with the string "para_". Next the git + * version is appended. The resulting string is logged with priority "INFO". */ -void daemon_log_welcome(const char *whoami) +void daemon_log_welcome(const char *name) { - PARA_INFO_LOG("welcome to %s " PACKAGE_VERSION " ("BUILD_DATE")\n", - whoami); + PARA_INFO_LOG("welcome to para_%s-" PACKAGE_VERSION " \n", name); } /**