[dovecot-cvs] dovecot/src/lib failures.c,1.27.2.4,1.27.2.5

tss at dovecot.org tss at dovecot.org
Fri Jan 19 18:25:53 UTC 2007


Update of /var/lib/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv21087

Modified Files:
      Tag: branch_1_0
	failures.c 
Log Message:
If we can't open the log file, write the error to stderr instead of relying
on the existing fatal handler which may not do anything.



Index: failures.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/failures.c,v
retrieving revision 1.27.2.4
retrieving revision 1.27.2.5
diff -u -d -r1.27.2.4 -r1.27.2.5
--- failures.c	22 Dec 2006 21:46:16 -0000	1.27.2.4
+++ failures.c	19 Jan 2007 18:25:51 -0000	1.27.2.5
@@ -341,8 +341,9 @@
 	else {
 		*file = fopen(path, "a");
 		if (*file == NULL) {
-			i_fatal_status(FATAL_LOGOPEN,
-				       "Can't open log file %s: %m", path);
+			fprintf(stderr, "Can't open log file %s: %s",
+				path, strerror(errno));
+			exit(FATAL_LOGOPEN);
 		}
 		fd_close_on_exec(fileno(*file), TRUE);
 	}



More information about the dovecot-cvs mailing list