]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
master: If config process doesn't exist when reloading config, create one to avoid...
authorTimo Sirainen <tss@iki.fi>
Sat, 10 Oct 2009 00:51:12 +0000 (20:51 -0400)
committerTimo Sirainen <tss@iki.fi>
Sat, 10 Oct 2009 00:51:12 +0000 (20:51 -0400)
--HG--
branch : HEAD

src/master/main.c

index 8064dcabd22dafdeebd632ab6c313b8570ac42a5..1d78e6b38a9a3f74531add60d69162a75a9c8c56 100644 (file)
@@ -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>
@@ -331,6 +332,16 @@ sig_settings_reload(const siginfo_t *si ATTR_UNUSED,
        /* 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;
        input.module = MASTER_SERVICE_NAME;