]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
From Guido:
authorhno <>
Mon, 21 Apr 2003 18:52:40 +0000 (18:52 +0000)
committerhno <>
Mon, 21 Apr 2003 18:52:40 +0000 (18:52 +0000)
 - changed rotate_logs() and reconfigure() from static to global
   (needed by service functionality)
 - added Windows platform info in cache.log

src/main.cc
src/protos.h

index c62df3cfacb3c5bc68ca69c5e51b8612d448ca17..64f6aef2805e53acaeffc06531c730a956e75797 100644 (file)
@@ -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);
index 1a4519f082016b2c1868179389673b7aba887ce4..5ab1b704b05b848a764be55a320f0c0b2857ccb5 100644 (file)
@@ -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);