From: Timo Sirainen Date: Mon, 17 Aug 2015 09:53:52 +0000 (+0300) Subject: lib-master: If idle-die callback returns FALSE, notify master that we don't want... X-Git-Tag: 2.2.19.rc1~254 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f94ca6b0f70641fe31c8e1f93404ca0df8bb289;p=thirdparty%2Fdovecot%2Fcore.git lib-master: If idle-die callback returns FALSE, notify master that we don't want to die. This avoids the master thinking that we're ignoring its idle-kill signal and logging an error. --- diff --git a/src/lib-master/master-service.c b/src/lib-master/master-service.c index 7c22f74355..eac7d3d1af 100644 --- a/src/lib-master/master-service.c +++ b/src/lib-master/master-service.c @@ -45,6 +45,8 @@ struct master_service *master_service; static void master_service_io_listeners_close(struct master_service *service); static void master_service_refresh_login_state(struct master_service *service); +static void +master_status_send(struct master_service *service, bool important_update); const char *master_service_getopt_string(void) { @@ -73,8 +75,12 @@ static void sig_die(const siginfo_t *si, void *context) return; if (service->idle_die_callback != NULL && - !service->idle_die_callback()) + !service->idle_die_callback()) { + /* we don't want to die - send a notification to master + so it doesn't think we're ignoring it completely. */ + master_status_send(service, FALSE); return; + } } service->killed = TRUE;