[dovecot-cvs] dovecot/src/master main.c,1.98,1.99
tss at dovecot.org
tss at dovecot.org
Sat Jan 27 01:44:30 UTC 2007
Update of /var/lib/cvs/dovecot/src/master
In directory talvi:/tmp/cvs-serv3766
Modified Files:
main.c
Log Message:
Added --log-error command line option.
Index: main.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/master/main.c,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -d -r1.98 -r1.99
--- main.c 25 Jan 2007 14:58:48 -0000 1.98
+++ main.c 27 Jan 2007 01:44:27 -0000 1.99
@@ -563,7 +563,7 @@
(void)close(fd);
}
-static void main_init(void)
+static void main_init(bool log_error)
{
/* deny file access from everyone else except owner */
(void)umask(0077);
@@ -581,6 +581,9 @@
log_init();
+ if (log_error)
+ i_fatal("This is Dovecot's error log");
+
lib_signals_init();
lib_signals_set_handler(SIGINT, TRUE, sig_die, NULL);
lib_signals_set_handler(SIGTERM, TRUE, sig_die, NULL);
@@ -753,7 +756,7 @@
{
/* parse arguments */
const char *exec_protocol = NULL, *exec_section = NULL, *user, *home;
- bool foreground = FALSE, ask_key_pass = FALSE;
+ bool foreground = FALSE, ask_key_pass = FALSE, log_error = FALSE;
bool dump_config = FALSE, dump_config_nondefaults = FALSE;
int i;
@@ -794,6 +797,9 @@
} else if (strcmp(argv[i], "--build-options") == 0) {
print_build_options();
return 0;
+ } else if (strcmp(argv[i], "--log-error") == 0) {
+ log_error = TRUE;
+ foreground = TRUE;
} else {
print_help();
i_fatal("Unknown argument: %s", argv[1]);
@@ -867,7 +873,7 @@
ioloop = io_loop_create(system_pool);
- main_init();
+ main_init(log_error);
io_loop_run(ioloop);
main_deinit();
More information about the dovecot-cvs
mailing list