X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fsysdep.c;h=5d81fe3d248b581420affe4fb8a5ad826f39c084;hb=fb6f6fa4ec4e3277e30d84326d48e6850822d318;hp=16c8e4f61b8cf3d649141b4852280f41a47e12f2;hpb=8ffdf2da8a54c95737cdf4f9fbb4908d4b31ff14;p=citadel.git diff --git a/webcit/sysdep.c b/webcit/sysdep.c index 16c8e4f61..5d81fe3d2 100644 --- a/webcit/sysdep.c +++ b/webcit/sysdep.c @@ -1,21 +1,15 @@ /* * WebCit "system dependent" code. * - * Copyright (c) 1996-2011 by the citadel.org team + * Copyright (c) 1996-2012 by the citadel.org team * * This program is open source software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * it under the terms of the GNU General Public License, version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "sysdep.h" @@ -79,7 +73,6 @@ pthread_key_t MyConKey; /* TSD key for MyContext() */ pthread_key_t MyReq; /* TSD key for MyReq() */ int msock; /* master listening socket */ int time_to_die = 0; /* Nonzero if server is shutting down */ -int verbosity = 9; /* Logging level */ extern void *context_loop(ParsedHttpHdrs *Hdr); extern void *housekeeping_loop(void); @@ -332,8 +325,6 @@ void start_daemon(char *pid_file) pid_t child = 0; FILE *fp; int do_restart = 0; - int rv; - FILE *rvfp = NULL; current_child = 0; @@ -341,7 +332,7 @@ void start_daemon(char *pid_file) * We don't just call close() because we don't want these fd's * to be reused for other files. */ - rv = chdir("/"); + chdir("/"); signal(SIGHUP, SIG_IGN); signal(SIGINT, SIG_IGN); @@ -354,9 +345,9 @@ void start_daemon(char *pid_file) setsid(); umask(0); - rvfp = freopen("/dev/null", "r", stdin); - rvfp = freopen("/dev/null", "w", stdout); - rvfp = freopen("/dev/null", "w", stderr); + freopen("/dev/null", "r", stdin); + freopen("/dev/null", "w", stdout); + freopen("/dev/null", "w", stderr); signal(SIGTERM, graceful_shutdown_watcher); signal(SIGHUP, graceful_shutdown_watcher);