Mercurial > dovecot > core-2.2
diff src/config/main.c @ 15562:bc11033ef035
config: Notify process creation success to master only after parsing config file
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 18 Dec 2012 21:37:57 +0200 |
parents | ba770cba5598 |
children | 13e74bd5ac8c |
line wrap: on
line diff
--- a/src/config/main.c Tue Dec 18 21:20:38 2012 +0200 +++ b/src/config/main.c Tue Dec 18 21:37:57 2012 +0200 @@ -26,13 +26,17 @@ restrict_access_by_env(NULL, FALSE); restrict_access_allow_coredumps(TRUE); - master_service_init_finish(master_service); config_parse_load_modules(); path = master_service_get_config_path(master_service); if (config_parse_file(path, TRUE, "", &error) <= 0) i_fatal("%s", error); + /* notify about our success only after successfully parsing the + config file, so if the parsing fails, master won't immediately + just recreate this process (and fail again and so on). */ + master_service_init_finish(master_service); + master_service_run(master_service, client_connected); config_connections_destroy_all();