Patch for Linux

From: Miquel van Smoorenburg <list-squid@dont-contact.us>
Date: 24 Jul 1998 15:26:04 GMT

This patch shuffles the signals around so that on Linux with LinuxThreads
least all the squid -k .... options work.

Can someone commit this to CVS ?

Oh, yes, I also wrote manpages for squid.8, squid-cgi.8 and squidclient.1
Shall I just post them here?

--- squid-1.2.beta23/src/aiops.c.orig Wed Jul 22 22:36:58 1998
+++ squid-1.2.beta23/src/aiops.c Fri Jul 24 09:57:18 1998
@@ -206,8 +206,13 @@
     sigemptyset(&new);
     sigaddset(&new, SIGPIPE);
     sigaddset(&new, SIGCHLD);
+#if (defined(_SQUID_LINUX_) && USE_ASYNC_IO)
+ sigaddset(&new, SIGQUIT);
+ sigaddset(&new, SIGTRAP);
+#else
     sigaddset(&new, SIGUSR1);
     sigaddset(&new, SIGUSR2);
+#endif
     sigaddset(&new, SIGHUP);
     sigaddset(&new, SIGTERM);
     sigaddset(&new, SIGINT);
--- squid-1.2.beta23/src/main.c.orig Thu Jul 23 05:22:29 1998
+++ squid-1.2.beta23/src/main.c Fri Jul 24 09:54:41 1998
@@ -153,9 +153,17 @@
             if (!strncmp(optarg, "reconfigure", strlen(optarg)))
                 opt_send_signal = SIGHUP;
             else if (!strncmp(optarg, "rotate", strlen(optarg)))
+#if (defined(_SQUID_LINUX_) && USE_ASYNC_IO)
+ opt_send_signal = SIGQUIT;
+#else
                 opt_send_signal = SIGUSR1;
+#endif
             else if (!strncmp(optarg, "debug", strlen(optarg)))
+#if (defined(_SQUID_LINUX_) && USE_ASYNC_IO)
+ opt_send_signal = SIGTRAP;
+#else
                 opt_send_signal = SIGUSR2;
+#endif
             else if (!strncmp(optarg, "shutdown", strlen(optarg)))
                 opt_send_signal = SIGTERM;
             else if (!strncmp(optarg, "interrupt", strlen(optarg)))
@@ -438,7 +446,10 @@
     if (!configured_once)
         writePidFile(); /* write PID file */
 
-#if !(defined(_SQUID_LINUX_) && USE_ASYNC_IO)
+#if (defined(_SQUID_LINUX_) && USE_ASYNC_IO)
+ squid_signal(SIGQUIT, rotate_logs, SA_RESTART);
+ squid_signal(SIGTRAP, sigusr2_handle, SA_RESTART);
+#else
     squid_signal(SIGUSR1, rotate_logs, SA_RESTART);
     squid_signal(SIGUSR2, sigusr2_handle, SA_RESTART);
 #endif

-- 
 Miquel van Smoorenburg | Our vision is to speed up time,
    miquels@cistron.nl  |   eventually eliminating it.
-- 
The From: and Reply-To: addresses are internal mail2news gateway addresses.
Reply to the list or to miquels@cistron.nl (Miquel van Smoorenburg)
Received on Fri Jul 24 1998 - 08:27:15 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:41:15 MST