From: wessels <> Date: Tue, 27 Aug 1996 01:13:03 +0000 (+0000) Subject: rename to opt_catch_signals X-Git-Tag: SQUID_3_0_PRE1~5926 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1758c6271fccbb59ec73224df8bce33b0de386c2;p=thirdparty%2Fsquid.git rename to opt_catch_signals --- diff --git a/src/main.cc b/src/main.cc index 065d19e329..7c4301c086 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1,5 +1,5 @@ /* - * $Id: main.cc,v 1.61 1996/08/21 05:47:03 wessels Exp $ + * $Id: main.cc,v 1.62 1996/08/26 19:13:03 wessels Exp $ * * DEBUG: section 1 Startup and Main Loop * AUTHOR: Harvest Derived @@ -113,11 +113,12 @@ int theOutIcpConnection = -1; int do_reuse = 1; int opt_unlink_on_reload = 0; int opt_reload_hit_only = 0; /* only UDP_HIT during store relaod */ -int catch_signals = 1; +int opt_catch_signals = 1; int opt_dns_tests = 1; int opt_foreground_rebuild = 0; int opt_zap_disk_store = 0; int opt_syslog_enable = 0; /* disabled by default */ +int opt_no_ipcache = 0; /* use ipcache by default */ int vhost_mode = 0; int unbuffered_logs = 1; /* debug and hierarhcy unbuffered by default */ int shutdown_pending = 0; /* set by SIGTERM handler (shut_down()) */ @@ -146,6 +147,7 @@ Usage: %s [-hsvzCDFRUVY] [-f config-file] [-[au] port]\n\ -a port Specify ASCII port number (default: %d).\n\ -f file Use given config-file instead of\n\ %s\n\ + -i Disable IP caching.\n\ -h Print help message.\n\ -s Enable logging to syslog.\n\ -u port Specify ICP port number (default: %d), disable with 0.\n\ @@ -169,10 +171,10 @@ static void mainParseOptions(argc, argv) extern char *optarg; int c; - while ((c = getopt(argc, argv, "CDFRUVYa:bf:hm:su:vz?")) != -1) { + while ((c = getopt(argc, argv, "CDFRUVYa:bf:him:su:vz?")) != -1) { switch (c) { case 'C': - catch_signals = 0; + opt_catch_signals = 0; break; case 'D': opt_dns_tests = 0; @@ -205,6 +207,9 @@ static void mainParseOptions(argc, argv) case 'h': usage(); break; + case 'i': + opt_no_ipcache = 1; + break; case 'm': #if MALLOC_DBG malloc_debug_level = atoi(optarg); @@ -390,7 +395,7 @@ static void mainReinitialize() static void mainInitialize() { static int first_time = 1; - if (catch_signals) { + if (opt_catch_signals) { squid_signal(SIGSEGV, death, SA_NODEFER | SA_RESETHAND); squid_signal(SIGBUS, death, SA_NODEFER | SA_RESETHAND); } @@ -513,7 +518,7 @@ int main(argc, argv) setMaxFD(); - if (catch_signals) + if (opt_catch_signals) for (n = FD_SETSIZE; n > 2; n--) close(n); diff --git a/src/squid.h b/src/squid.h index 9532c34a33..9f9dc0b56f 100644 --- a/src/squid.h +++ b/src/squid.h @@ -1,6 +1,6 @@ /* - * $Id: squid.h,v 1.37 1996/08/19 22:44:56 wessels Exp $ + * $Id: squid.h,v 1.38 1996/08/26 19:15:41 wessels Exp $ * * AUTHOR: Duane Wessels * @@ -255,7 +255,6 @@ extern void shut_down _PARAMS((int)); extern time_t squid_starttime; /* main.c */ extern time_t next_cleaning; /* main.c */ -extern int catch_signals; /* main.c */ extern int do_reuse; /* main.c */ extern int theHttpConnection; /* main.c */ extern int theInIcpConnection; /* main.c */ @@ -268,6 +267,8 @@ extern int opt_dns_tests; /* main.c */ extern int opt_foreground_rebuild; /* main.c */ extern int opt_zap_disk_store; /* main.c */ extern int opt_syslog_enable; /* main.c */ +extern int opt_catch_signals; /* main.c */ +extern int opt_no_ipcache; /* main.c */ extern int vhost_mode; /* main.c */ extern char version_string[]; /* main.c */ extern char appname[]; /* main.c */ diff --git a/src/tools.cc b/src/tools.cc index d9610be560..6e9b4a0530 100644 --- a/src/tools.cc +++ b/src/tools.cc @@ -1,6 +1,6 @@ /* - * $Id: tools.cc,v 1.48 1996/08/19 23:09:26 wessels Exp $ + * $Id: tools.cc,v 1.49 1996/08/26 19:14:54 wessels Exp $ * * DEBUG: section 21 Misc Functions * AUTHOR: Harvest Derived @@ -323,7 +323,7 @@ void fatal_dump(message) { if (message) fatal_common(message); - if (catch_signals) + if (opt_catch_signals) storeWriteCleanLog(); abort(); }