#
# Makefile for the Squid Object Cache server
#
-# $Id: Makefile.in,v 1.86 1997/08/25 03:51:46 wessels Exp $
+# $Id: Makefile.in,v 1.87 1997/10/27 23:30:20 wessels Exp $
#
# Uncomment and customize the following to suit your needs:
#
# do NOT define both USE_SPLAY_TREE and USE_BIN_TREE at the same time!
USE_SPLAY_TREE = # -DUSE_SPLAY_TREE
USE_BIN_TREE = # -DUSE_BIN_TREE
+ALARM_UPDATES_TIME = # -DALARM_UPDATES_TIME=1
DEFINES = $(HOST_OPT) $(AUTH_OPT) $(LOG_HDRS_OPT) \
$(ICMP_OPT) $(DELAY_HACK) $(USERAGENT_OPT) \
- $(KILL_PARENT_OPT) $(USE_POLL_OPT) \
- $(USE_SPLAY_TREE) $(USE_BIN_TREE)
+ $(KILL_PARENT_OPT) $(USE_POLL_OPT) \
+ $(USE_SPLAY_TREE) $(USE_BIN_TREE) \
+ $(ALARM_UPDATES_TIME)
prefix = @prefix@
exec_prefix = @exec_prefix@
/*
- * $Id: comm.cc,v 1.198 1997/10/27 21:58:48 wessels Exp $
+ * $Id: comm.cc,v 1.199 1997/10/27 23:30:22 wessels Exp $
*
* DEBUG: section 5 Socket Functions
* AUTHOR: Harvest Derived
int poll_time;
static int incoming_counter = 0;
time_t timeout;
- /* assume all process are very fast (less than 1 second). Call
- * time() only once */
- /* use only 1 second granularity */
timeout = squid_curtime + sec;
do {
+#if !ALARM_UPDATES_TIME
+ getCurrentTime();
+#endif
if (shutdown_pending || reconfigure_pending) {
serverConnectionsClose();
dnsShutdownServers();
timeout = squid_curtime + sec;
do {
+#if !ALARM_UPDATES_TIME
+ getCurrentTime();
+#endif
FD_ZERO(&readfds);
FD_ZERO(&writefds);
if (shutdown_pending || reconfigure_pending) {
/*
- * $Id: main.cc,v 1.179 1997/10/26 02:35:35 wessels Exp $
+ * $Id: main.cc,v 1.180 1997/10/27 23:30:24 wessels Exp $
*
* DEBUG: section 1 Startup and Main Loop
* AUTHOR: Harvest Derived
static int malloc_debug_level = 0;
#endif
-static void rotate_logs(int);
-static void reconfigure(int);
-static void time_tick(int);
+static SIGHDLR rotate_logs;
+static SIGHDLR reconfigure;
+#if ALARM_UPDATES_TIME
+static SIGHDLR time_tick;
+#endif
static void mainInitialize(void);
static void mainReconfigure(void);
static void usage(void);
#endif
}
+#if ALARM_UPDATES_TIME
static void
time_tick(int sig)
{
signal(sig, time_tick);
#endif
}
-
+#endif
static void
reconfigure(int sig)
squid_signal(SIGHUP, reconfigure, SA_RESTART);
squid_signal(SIGTERM, shut_down, SA_NODEFER | SA_RESETHAND | SA_RESTART);
squid_signal(SIGINT, shut_down, SA_NODEFER | SA_RESETHAND | SA_RESTART);
+#if ALARM_UPDATES_TIME
squid_signal(SIGALRM, time_tick, SA_RESTART);
alarm(1);
+#endif
debug(1, 0) ("Ready to serve requests.\n");
if (!configured_once) {