From: Timo Sirainen Date: Mon, 5 Oct 2009 20:54:53 +0000 (-0400) Subject: If info/debug log can't be opened, log about it to error log. X-Git-Tag: 2.0.alpha1~85 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=397e389715d49a8abfe078e3f7141f63960d412d;p=thirdparty%2Fdovecot%2Fcore.git If info/debug log can't be opened, log about it to error log. --HG-- branch : HEAD --- diff --git a/src/lib/failures.c b/src/lib/failures.c index fbc44f7621..51b869a541 100644 --- a/src/lib/failures.c +++ b/src/lib/failures.c @@ -429,7 +429,10 @@ static void open_log_file(int *fd, const char *path) 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); }