dovecot-1.1: dovecot --exec-mail: Never listen input from stderr...

dovecot at dovecot.org dovecot at dovecot.org
Sat Nov 15 19:34:45 EET 2008


details:   http://hg.dovecot.org/dovecot-1.1/rev/3ca745401bd2
changeset: 8009:3ca745401bd2
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Nov 15 19:34:15 2008 +0200
description:
dovecot --exec-mail: Never listen input from stderr, there's no point.

diffstat:

1 file changed, 7 insertions(+), 5 deletions(-)
src/master/mail-process.c |   12 +++++++-----

diffs (43 lines):

diff -r ecdd82b6b3e0 -r 3ca745401bd2 src/master/mail-process.c
--- a/src/master/mail-process.c	Sat Nov 15 19:21:44 2008 +0200
+++ b/src/master/mail-process.c	Sat Nov 15 19:34:15 2008 +0200
@@ -290,7 +290,7 @@ static void
 static void
 mail_process_set_environment(struct settings *set, const char *mail,
 			     const struct var_expand_table *var_expand_table,
-			     bool dump_capability)
+			     bool dump_capability, bool exec_mail)
 {
 	const char *const *envs;
 	string_t *str;
@@ -368,8 +368,10 @@ mail_process_set_environment(struct sett
 	if (set->mbox_lazy_writes)
 		env_put("MBOX_LAZY_WRITES=1");
 	/* when running dump-capability log still points to stderr,
-	   and io_add()ing it might break (epoll_ctl() gives EPERM) */
-	if (set->shutdown_clients && !dump_capability)
+	   and io_add()ing it might break (epoll_ctl() gives EPERM).
+	   with --exec-mail there's no benefit in adding an extra stderr
+	   listener, but it might cause problems. */
+	if (set->shutdown_clients && !dump_capability && !exec_mail)
 		env_put("STDERR_CLOSE_SHUTDOWN=1");
 	(void)umask(set->umask);
 
@@ -484,7 +486,7 @@ void mail_process_exec(const char *proto
 	}
 
 	mail_process_set_environment(set, getenv("MAIL"), var_expand_table,
-				     FALSE);
+				     FALSE, TRUE);
 	if (args == NULL)
 		client_process_exec(executable, "");
 	else
@@ -813,7 +815,7 @@ create_mail_process(enum process_type pr
 	}
 
 	mail_process_set_environment(set, mail, var_expand_table,
-				     dump_capability);
+				     dump_capability, FALSE);
 
 	/* extra args. uppercase key value. */
 	args = array_get(&extra_args, &count);


More information about the dovecot-cvs mailing list