PROF_start(SignalEngine_checkEvents);
if (do_reconfigure) {
- mainReconfigureStart();
- do_reconfigure = 0;
+ if (!reconfiguring && configured_once) {
+ mainReconfigureStart();
+ do_reconfigure = 0;
+ } // else wait until previous reconfigure is done
} else if (do_rotate) {
mainRotate();
do_rotate = 0;
writePidFile(); /* write PID file */
reconfiguring = 0;
+
+ // ignore any pending re-reconfigure signals if shutdown received
+ if (do_shutdown)
+ do_reconfigure = 0;
}
static void
squid_signal(SIGPIPE, SIG_IGN, SA_RESTART);
squid_signal(SIGCHLD, sig_child, SA_NODEFER | SA_RESTART);
+ squid_signal(SIGHUP, reconfigure, SA_RESTART);
setEffectiveUser();
#endif
- 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);
Format::Token::Init(); // XXX: temporary. Use a runners registry of pre-parse runners instead.
try {
+ do_reconfigure = 0; // ignore any early (boot/startup) reconfigure signals
parse_err = parseConfigFile(ConfigFile);
} catch (...) {
// for now any errors are a fatal condition...