-/* Copyright (C) 2009-2012, Martin Johansson <martin@fatbob.nu>
- Copyright (C) 2005-2012, Thorvald Natvig <thorvald@natvig.com>
+/* Copyright (C) 2009-2014, Martin Johansson <martin@fatbob.nu>
+ Copyright (C) 2005-2014, Thorvald Natvig <thorvald@natvig.com>
All rights reserved.
}
snprintf(str,16,"%d\n", getpid());
- write(lfp, str, strlen(str)); /* record pid to lockfile */
+ (void)write(lfp, str, strlen(str)); /* record pid to lockfile */
Log_info("PID-file: %s", pidfile);
/* If uMurmur ever starts to fork()+exec(), we don't want it to
close(i); /* close all descriptors */
i = open("/dev/null",O_RDWR);
- dup(i);
- dup(i);
+ (void)dup(i);
+ (void)dup(i);
umask(027); /* set newly created file permissions */
- chdir("/");
+ (void)chdir("/");
}
void printhelp()
{
- printf("uMurmur version %s. Mumble protocol %d.%d.%d\n", UMURMUR_VERSION, PROTVER_MAJOR, PROTVER_MINOR, PROTVER_PATCH);
+ printf("uMurmur version %s ('%s'). Mumble protocol %d.%d.%d\n", UMURMUR_VERSION,
+ UMURMUR_CODENAME, PROTVER_MAJOR, PROTVER_MINOR, PROTVER_PATCH);
printf("Usage: umurmurd [-d] [-r] [-h] [-p <pidfile>] [-t] [-c <conf file>] [-a <addr>] [-b <port>]\n");
printf(" -d - Do not daemonize - run in foreground.\n");
#ifdef POSIX_PRIORITY_SCHEDULING