X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fprocess.c;h=c8231afb43d56768ca2a5cdf65931ef28fe49e1a;hb=70a1a5594af5d4e6a364186b42ba4e34c676009b;hp=680d3179297e3bfbdf5032a87d54992391f57d3d;hpb=d917c8cb6b69475d568ccbe82389b9f2b3eb5e80;p=tinc diff --git a/src/process.c b/src/process.c index 680d3179..c8231afb 100644 --- a/src/process.c +++ b/src/process.c @@ -1,7 +1,7 @@ /* process.c -- process management functions Copyright (C) 1999-2005 Ivo Timmermans, - 2000-2011 Guus Sliepen + 2000-2012 Guus Sliepen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -73,7 +73,7 @@ static bool install_service(void) { strncat(command, "\"", sizeof command - strlen(command)); for(char **argp = g_argv + 1; *argp; argp++) { - char &space = strchr(*argp, ' '); + char *space = strchr(*argp, ' '); strncat(command, " ", sizeof command - strlen(command)); if(space) @@ -204,8 +204,7 @@ bool detach(void) { if(do_detach) { #ifndef HAVE_MINGW if(daemon(0, 0)) { - fprintf(stderr, "Couldn't detach from terminal: %s", - strerror(errno)); + logger(DEBUG_ALWAYS, LOG_ERR, "Couldn't detach from terminal: %s", strerror(errno)); return false; } #else