X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=src%2Fmain.c;h=b92bc21e58fa2d97a15ce2195a87ad15894e6f6c;hb=bb58415037ceff0a0668d4b8bd789ec947170b54;hp=c84e1a80545a07b15c8349a9b32933da26cbd45f;hpb=792fd933e851a751885e58ed5ed59939d3be8f84;p=umurmur.git diff --git a/src/main.c b/src/main.c index c84e1a8..b92bc21 100644 --- a/src/main.c +++ b/src/main.c @@ -1,5 +1,5 @@ -/* Copyright (C) 2009-2012, Martin Johansson - Copyright (C) 2005-2012, Thorvald Natvig +/* Copyright (C) 2009-2013, Martin Johansson + Copyright (C) 2005-2013, Thorvald Natvig All rights reserved. @@ -89,7 +89,7 @@ void lockfile(const char *pidfile) } 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 @@ -195,11 +195,11 @@ void daemonize() 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("/"); } @@ -219,7 +219,8 @@ void setscheduler() 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 ] [-t] [-c ] [-a ] [-b ]\n"); printf(" -d - Do not daemonize - run in foreground.\n"); #ifdef POSIX_PRIORITY_SCHEDULING