Mercurial > dovecot > original-hg > dovecot-1.2
changeset 6303:9e33d9b9905a HEAD
--log-error improvements.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 16 Aug 2007 19:06:27 +0300 |
parents | a8d5d826318b |
children | aa00e299dfe6 |
files | src/master/main.c |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/master/main.c Thu Aug 16 17:35:45 2007 +0300 +++ b/src/master/main.c Thu Aug 16 19:06:27 2007 +0300 @@ -183,13 +183,15 @@ if (dup2(null_fd, 2) < 0) i_fatal("dup2(2) failed: %m"); } - i_info("Dovecot v"VERSION" starting up"); if (log_error) { + printf("Writing to error logs and killing myself..\n"); + i_info("This is Dovecot's info log"); i_warning("This is Dovecot's warning log"); i_error("This is Dovecot's error log"); i_fatal("This is Dovecot's fatal log"); } + i_info("Dovecot v"VERSION" starting up"); lib_signals_init(); lib_signals_set_handler(SIGINT, TRUE, sig_die, NULL); @@ -436,7 +438,7 @@ t_push(); master_settings_init(); if (!master_settings_read(configfile, exec_protocol != NULL, - dump_config)) + dump_config || log_error)) i_fatal("Invalid configuration in %s", configfile); t_pop(); @@ -477,7 +479,8 @@ mail_process_exec(exec_protocol, exec_section); } - open_fds(); + if (!log_error) + open_fds(); if (!foreground) daemonize(settings_root->defaults);