dovecot-2.2: master: Added an assert to catch duplicate fork() P...

dovecot at dovecot.org dovecot at dovecot.org
Mon Oct 27 18:11:18 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/f97ca2bde414
changeset: 18029:f97ca2bde414
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Oct 27 20:10:19 2014 +0200
description:
master: Added an assert to catch duplicate fork() PIDs.
This really shouldn't be happening, but apparently it does sometimes. This
should make it easier to debug.

diffstat:

 src/master/service-process.c |  1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diffs (11 lines):

diff -r 78f24e681302 -r f97ca2bde414 src/master/service-process.c
--- a/src/master/service-process.c	Mon Oct 27 17:05:52 2014 +0200
+++ b/src/master/service-process.c	Mon Oct 27 20:10:19 2014 +0200
@@ -334,6 +334,7 @@
 		drop_privileges(service);
 		process_exec(service->executable, NULL);
 	}
+	i_assert(hash_table_lookup(service_pids, POINTER_CAST(pid)) == NULL);
 
 	process = i_new(struct service_process, 1);
 	process->service = service;


More information about the dovecot-cvs mailing list