dovecot-1.2: When shutting down, don't try to restart dict proce...

dovecot at dovecot.org dovecot at dovecot.org
Wed Apr 1 23:37:00 EEST 2009


details:   http://hg.dovecot.org/dovecot-1.2/rev/7ddf32656d8c
changeset: 8887:7ddf32656d8c
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Apr 01 16:36:56 2009 -0400
description:
When shutting down, don't try to restart dict processes.

diffstat:

1 file changed, 2 insertions(+), 1 deletion(-)
src/master/dict-process.c |    3 ++-

diffs (20 lines):

diff -r 11d2f0fffb61 -r 7ddf32656d8c src/master/dict-process.c
--- a/src/master/dict-process.c	Wed Apr 01 16:09:58 2009 -0400
+++ b/src/master/dict-process.c	Wed Apr 01 16:36:56 2009 -0400
@@ -194,6 +194,7 @@ static void dict_listener_deinit(struct 
 		io_remove(&listener->io);
 	if (close(listener->fd) < 0)
 		i_error("close(dict listener) failed: %m");
+	listener->fd = -1;
 
 	/* don't try to free the dict processes here,
 	   let dict_process_destroyed() do it to avoid "unknown child exited"
@@ -209,7 +210,7 @@ dict_process_destroyed(struct child_proc
 	struct dict_listener *listener = process->listener;
 
 	dict_process_deinit(process);
-	if (listener->processes == NULL) {
+	if (listener->processes == NULL && listener->fd != -1) {
 		/* last listener died, create new ones */
 		listener->io = io_add(listener->fd, IO_READ,
 				      dict_listener_input, listener);


More information about the dovecot-cvs mailing list