dovecot-2.0: If info/debug log can't be opened, log about it to ...

dovecot at dovecot.org dovecot at dovecot.org
Mon Oct 5 23:55:41 EEST 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/0af777d3e34a
changeset: 9967:0af777d3e34a
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Oct 05 16:54:53 2009 -0400
description:
If info/debug log can't be opened, log about it to error log.

diffstat:

1 file changed, 4 insertions(+), 1 deletion(-)
src/lib/failures.c |    5 ++++-

diffs (15 lines):

diff -r f68b322167d7 -r 0af777d3e34a src/lib/failures.c
--- a/src/lib/failures.c	Mon Oct 05 14:56:51 2009 -0400
+++ b/src/lib/failures.c	Mon Oct 05 16:54:53 2009 -0400
@@ -429,7 +429,10 @@ static void open_log_file(int *fd, const
 			i_snprintf(buf, sizeof(buf),
 				   "Can't open log file %s: %m\n", path);
 			(void)write_full(STDERR_FILENO, buf, strlen(buf));
-			failure_exit(FATAL_LOGOPEN);
+			if (fd == &log_fd)
+				failure_exit(FATAL_LOGOPEN);
+			else
+				i_fatal_status(FATAL_LOGOPEN, "%s", buf);
 		}
 		fd_close_on_exec(*fd, TRUE);
 	}


More information about the dovecot-cvs mailing list