dovecot-2.0: lib-master: Added MASTER_SERVICE_FLAG_NO_IDLE_DIE.

dovecot at dovecot.org dovecot at dovecot.org
Mon Jun 21 18:54:14 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/11cb0e93ff32
changeset: 11596:11cb0e93ff32
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Jun 21 16:53:33 2010 +0100
description:
lib-master: Added MASTER_SERVICE_FLAG_NO_IDLE_DIE.

diffstat:

 src/lib-master/master-service.c |  3 ++-
 src/lib-master/master-service.h |  4 +++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 585318bf974d -r 11cb0e93ff32 src/lib-master/master-service.c
--- a/src/lib-master/master-service.c	Mon Jun 21 16:48:45 2010 +0100
+++ b/src/lib-master/master-service.c	Mon Jun 21 16:53:33 2010 +0100
@@ -58,7 +58,8 @@
 			  si->si_signo, dec2str(si->si_pid),
 			  dec2str(si->si_uid),
 			  lib_signal_code_to_str(si->si_signo, si->si_code));
-	} else if ((service->flags & MASTER_SERVICE_FLAG_STANDALONE) == 0) {
+	} else if ((service->flags & (MASTER_SERVICE_FLAG_STANDALONE |
+				      MASTER_SERVICE_FLAG_NO_IDLE_DIE)) == 0) {
 		/* SIGINT came from master. die only if we're not handling
 		   any clients currently. */
 		if (service->master_status.available_count !=
diff -r 585318bf974d -r 11cb0e93ff32 src/lib-master/master-service.h
--- a/src/lib-master/master-service.h	Mon Jun 21 16:48:45 2010 +0100
+++ b/src/lib-master/master-service.h	Mon Jun 21 16:53:33 2010 +0100
@@ -17,7 +17,9 @@
 	/* Don't read settings, but use whatever is in environment */
 	MASTER_SERVICE_FLAG_NO_CONFIG_SETTINGS	= 0x10,
 	/* Use MASTER_LOGIN_NOTIFY_FD to track login overflow state */
-	MASTER_SERVICE_FLAG_TRACK_LOGIN_STATE	= 0x40
+	MASTER_SERVICE_FLAG_TRACK_LOGIN_STATE	= 0x40,
+	/* If master sends SIGINT, don't die even if we don't have clients */
+	MASTER_SERVICE_FLAG_NO_IDLE_DIE		= 0x80
 };
 
 struct master_service_connection {


More information about the dovecot-cvs mailing list