dovecot-2.0: anvil: Show number of connections in process title ...

dovecot at dovecot.org dovecot at dovecot.org
Wed Nov 3 17:31:55 EET 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/7b1aae5f7bd5
changeset: 12373:7b1aae5f7bd5
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Nov 03 15:26:40 2010 +0000
description:
anvil: Show number of connections in process title if verbose_proctitle=yes

diffstat:

 src/anvil/main.c |  11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diffs (30 lines):

diff -r 4d91cec713cf -r 7b1aae5f7bd5 src/anvil/main.c
--- a/src/anvil/main.c	Wed Nov 03 15:23:52 2010 +0000
+++ b/src/anvil/main.c	Wed Nov 03 15:26:40 2010 +0000
@@ -7,6 +7,7 @@
 #include "ioloop.h"
 #include "restrict-access.h"
 #include "master-service.h"
+#include "master-service-settings.h"
 #include "master-interface.h"
 #include "connect-limit.h"
 #include "penalty.h"
@@ -49,9 +50,17 @@
 
 int main(int argc, char *argv[])
 {
-	master_service = master_service_init("anvil", 0, &argc, &argv, NULL);
+	const enum master_service_flags service_flags =
+		MASTER_SERVICE_FLAG_UPDATE_PROCTITLE;
+	const char *error;
+
+	master_service = master_service_init("anvil", service_flags,
+					     &argc, &argv, NULL);
 	if (master_getopt(master_service) > 0)
 		return FATAL_DEFAULT;
+	if (master_service_settings_read_simple(master_service,
+						NULL, &error) < 0)
+		i_fatal("Error reading configuration: %s", error);
 	master_service_init_log(master_service, "anvil: ");
 
 	restrict_access_by_env(NULL, FALSE);


More information about the dovecot-cvs mailing list