]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
If info/debug log can't be opened, log about it to error log.
authorTimo Sirainen <tss@iki.fi>
Mon, 5 Oct 2009 20:54:53 +0000 (16:54 -0400)
committerTimo Sirainen <tss@iki.fi>
Mon, 5 Oct 2009 20:54:53 +0000 (16:54 -0400)
--HG--
branch : HEAD

src/lib/failures.c

index fbc44f76212b47f60721e845addeab8b00cbd61d..51b869a541f8e90d4dc08a19d172fe28b3116b94 100644 (file)
@@ -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);
        }