dovecot-1.2: If info log can't be opened, log about it to error ...

dovecot at dovecot.org dovecot at dovecot.org
Mon Oct 5 23:53:18 EEST 2009


details:   http://hg.dovecot.org/dovecot-1.2/rev/ae29ecea8d06
changeset: 9410:ae29ecea8d06
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Oct 05 16:53:09 2009 -0400
description:
If info 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 a0fa514d92f0 -r ae29ecea8d06 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:53:09 2009 -0400
@@ -369,7 +369,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