]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
master: If log process crashes, restart it immediately.
authorTimo Sirainen <tss@iki.fi>
Fri, 3 Oct 2014 13:04:06 +0000 (16:04 +0300)
committerTimo Sirainen <tss@iki.fi>
Fri, 3 Oct 2014 13:04:06 +0000 (16:04 +0300)
The regular service_monitor_listen_start() doesn't work for it, because the
log fds aren't in the listeners.

src/master/service-monitor.c

index c4cbaea9e972657b79e63a1a944e38584623e171..6e0c66f6e17a1b430ecc73d29a51486b8f7bb7a1 100644 (file)
@@ -656,8 +656,16 @@ void services_monitor_reap_children(void)
                        service_monitor_start_extra_avail(service);
                        /* if there are no longer listening processes,
                           start listening for more */
-                       if (service->to_throttle == NULL)
+                       if (service->to_throttle != NULL) {
+                               /* throttling */
+                       } else if (service == service->list->log &&
+                                  service->process_count == 0) {
+                               /* log service must always be running */
+                               if (service_process_create(service) == NULL)
+                                       service_monitor_throttle(service);
+                       } else {
                                service_monitor_listen_start(service);
+                       }
                }
                service_list_unref(service->list);
        }