From: rousskov <> Date: Fri, 13 Apr 2007 10:52:19 +0000 (+0000) Subject: Reverted revision 1.442 change that was supposed to fix X-Git-Tag: SQUID_3_0_PRE6~98 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95564b0d5546d9a75ba4c785db5ce9145e56bdc8;p=thirdparty%2Fsquid.git Reverted revision 1.442 change that was supposed to fix bug #1837: Segfault on configuration error It turns out a better fix for the same bug has been already committed by Duane Wessels: 1.88 +2 -2 squid3/src/store_rebuild.cc 1.157 +9 -2 squid3/src/store_dir.cc store_dirs_rebuilding should be initialized to 1 store_dirs_rebuilding is initialized to _1_ as a hack so that storeDirWriteCleanLogs() doesn't try to do anything unless _all_ cache_dirs have been read. For example, without this hack, Squid will try to write clean log files if -kparse fails (becasue it calls fatal()). --- diff --git a/src/main.cc b/src/main.cc index 1e85fc9d97..3f15e7378b 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1,6 +1,6 @@ /* - * $Id: main.cc,v 1.442 2007/04/12 14:51:10 rousskov Exp $ + * $Id: main.cc,v 1.443 2007/04/13 04:52:19 rousskov Exp $ * * DEBUG: section 1 Startup and Main Loop * AUTHOR: Harvest Derived @@ -1184,10 +1184,6 @@ main(int argc, char **argv) Mem::Init(); - setMaxFD(); - - comm_init(); /* initialize early to handle fatal() errors */ - storeFsInit(); /* required for config parsing */ /* May not be needed for parsing, have not audited for such */ @@ -1211,6 +1207,7 @@ main(int argc, char **argv) #if TEST_ACCESS + comm_init(); comm_select_init(); @@ -1258,6 +1255,10 @@ main(int argc, char **argv) if (!opt_no_daemon) watch_child(argv); + setMaxFD(); + + /* init comm module */ + comm_init(); comm_select_init();