When quitting on a fatal error, such as a configuration error, Squid may need
to write clean state/log files. Squid uses comm_ routines to do so. Thus, we
must initialize comm_ before such fatal errors are discovered.
Perhaps a better fix would be to avoid writing clean state/log files until
the old ones become dirty?
/*
- * $Id: main.cc,v 1.441 2007/02/05 15:15:03 hno Exp $
+ * $Id: main.cc,v 1.442 2007/04/12 14:51:10 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();