httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject [PATCH] ensure config errors/warnings are logged
Date Sat, 25 Oct 1997 08:39:10 GMT
A slight mess up in my patch which fixed the stdin/out/err behaviour.  I
really wanted it to send config errors/warnings to stderr the first pass,
then open the error log, and send them there on the second pass.  This
patch does that.  So, for example, folks will get the vhost warnings and
such in their error_log as well as stderr ... which is good because folks
are still redirecting stderr to /dev/null. 

BTW, the second hunk of this patch maintains a wonderful property of inetd
mode ... init_modules is called twice without an intervening clear_pool
and read_config and whatnot.

Dean

Index: main/http_main.c
===================================================================
RCS file: /export/home/cvs/apachen/src/main/http_main.c,v
retrieving revision 1.237
diff -u -r1.237 http_main.c
--- http_main.c	1997/10/22 20:29:40	1.237
+++ http_main.c	1997/10/25 08:33:08
@@ -3390,9 +3395,10 @@
 
     suexec_enabled = init_suexec();
     server_conf = read_config(pconf, ptrans, server_confname);
-    init_modules(pconf, server_conf);
 
     if (standalone) {
+	open_logs(server_conf, pconf);
+	init_modules(pconf, server_conf);
 	STANDALONE_MAIN(argc, argv);
     }
     else {
@@ -3402,6 +3408,8 @@
 	BUFF *cio;
 	NET_SIZE_T l;
 
+	/* Yes this is called twice. */
+	init_modules(pconf, server_conf);
 	open_logs(server_conf, pconf);
 	init_modules(pconf, server_conf);
 	set_group_privs();


Mime
View raw message