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()).
/*
- * $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
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 */
#if TEST_ACCESS
+ comm_init();
comm_select_init();
if (!opt_no_daemon)
watch_child(argv);
+ setMaxFD();
+
+ /* init comm module */
+ comm_init();
comm_select_init();