dovecot-2.0: master: If config process doesn't exist when reload...

dovecot at dovecot.org dovecot at dovecot.org
Sat Oct 10 03:51:17 EEST 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/fa9d2204b453
changeset: 10031:fa9d2204b453
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Oct 09 20:51:12 2009 -0400
description:
master: If config process doesn't exist when reloading config, create one to avoid hanging.

diffstat:

1 file changed, 11 insertions(+)
src/master/main.c |   11 +++++++++++

diffs (28 lines):

diff -r 364dc7ae87e4 -r fa9d2204b453 src/master/main.c
--- a/src/master/main.c	Fri Oct 09 20:50:16 2009 -0400
+++ b/src/master/main.c	Fri Oct 09 20:51:12 2009 -0400
@@ -16,6 +16,7 @@
 #include "service.h"
 #include "service-listen.h"
 #include "service-monitor.h"
+#include "service-process.h"
 #include "service-log.h"
 
 #include <stdio.h>
@@ -330,6 +331,16 @@ sig_settings_reload(const siginfo_t *si 
 
 	/* see if hostname changed */
 	hostpid_init();
+
+	if (services->config->process_avail == 0) {
+		/* we can't reload config if there's no config process. */
+		if (service_process_create(services->config,
+					   NULL, NULL) == NULL) {
+			i_error("Can't reload configuration because "
+				"we couldn't create a config process");
+			return;
+		}
+	}
 
 	memset(&input, 0, sizeof(input));
 	input.roots = set_roots;


More information about the dovecot-cvs mailing list