From: Timo Sirainen Date: Tue, 18 Dec 2012 19:37:57 +0000 (+0200) Subject: config: Notify process creation success to master only after parsing config file X-Git-Tag: 2.1.13~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1af33d3c483b1759c4b184937b5f9829afb6b238;p=thirdparty%2Fdovecot%2Fcore.git config: Notify process creation success to master only after parsing config file --- diff --git a/src/config/main.c b/src/config/main.c index 32f72d58cb..30be8f0d18 100644 --- a/src/config/main.c +++ b/src/config/main.c @@ -26,13 +26,17 @@ int main(int argc, char *argv[]) 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();