From: hno <> Date: Mon, 21 Apr 2003 18:52:40 +0000 (+0000) Subject: From Guido: X-Git-Tag: SQUID_3_0_PRE1~246 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b293c4d81b3984c7898ccecda3ba042abc78d770;p=thirdparty%2Fsquid.git From Guido: - changed rotate_logs() and reconfigure() from static to global (needed by service functionality) - added Windows platform info in cache.log --- diff --git a/src/main.cc b/src/main.cc index c62df3cfac..64f6aef280 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1,6 +1,6 @@ /* - * $Id: main.cc,v 1.370 2003/04/20 05:28:58 robertc Exp $ + * $Id: main.cc,v 1.371 2003/04/21 12:52:40 hno Exp $ * * DEBUG: section 1 Startup and Main Loop * AUTHOR: Harvest Derived @@ -43,7 +43,7 @@ #include "ACL.h" /* for error reporting from xmalloc and friends */ -extern void (*failure_notify) (const char *); +SQUIDCEXTERN void (*failure_notify) (const char *); static int opt_send_signal = -1; static int opt_no_daemon = 0; @@ -59,8 +59,6 @@ static volatile int do_shutdown = 0; static void mainRotate(void); static void mainReconfigure(void); -static SIGHDLR rotate_logs; -static SIGHDLR reconfigure; static void mainInitialize(void); static void usage(void); static void mainParseOptions(int, char **); @@ -76,7 +74,9 @@ static EVH SquidShutdown; static void mainSetCwd(void); static int checkRunningPid(void); +#ifndef _SQUID_MSWIN_ static const char *squid_start_script = "squid_start"; +#endif #if TEST_ACCESS #include "test_access.c" @@ -302,7 +302,7 @@ mainParseOptions(int argc, char *argv[]) } /* ARGSUSED */ -static void +void rotate_logs(int sig) { do_rotate = 1; @@ -315,7 +315,7 @@ rotate_logs(int sig) } /* ARGSUSED */ -static void +void reconfigure(int sig) { do_reconfigure = 1; @@ -588,6 +588,16 @@ mainInitialize(void) version_string, CONFIG_HOST_TYPE); +#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) + + if (WIN32_run_mode == _WIN_SQUID_RUN_MODE_SERVICE) { + debug(1, 0) ("Running as %s Windows System Service on %s\n", WIN32_Service_name, WIN32_OS_string); + debug(1, 0) ("Service command line is: %s\n", WIN32_Service_Command_Line); + } else + debug(1, 0) ("Running on %s\n",WIN32_OS_string); + +#endif + debug(1, 1) ("Process ID %d\n", (int) getpid()); debug(1, 1) ("With %d file descriptors available\n", Squid_MaxFD); diff --git a/src/protos.h b/src/protos.h index 1a4519f082..5ab1b704b0 100644 --- a/src/protos.h +++ b/src/protos.h @@ -1,6 +1,6 @@ /* - * $Id: protos.h,v 1.475 2003/04/20 05:28:59 robertc Exp $ + * $Id: protos.h,v 1.476 2003/04/21 12:52:40 hno Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -658,6 +658,8 @@ extern void refreshInit(void); extern void serverConnectionsClose(void); extern void shut_down(int); +extern void rotate_logs(int); +extern void reconfigure(int); extern void start_announce(void *unused);