dovecot-2.2: config: Notify process creation success to master o...

dovecot at dovecot.org dovecot at dovecot.org
Sat Jan 5 01:14:35 EET 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/bc11033ef035
changeset: 15562:bc11033ef035
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Dec 18 21:37:57 2012 +0200
description:
config: Notify process creation success to master only after parsing config file

diffstat:

 src/config/main.c |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (22 lines):

diff -r 310b3a77a9d1 -r bc11033ef035 src/config/main.c
--- 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();
 


More information about the dovecot-cvs mailing list