httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Sutton <p...@ukweb.com>
Subject Dean's patches and NT, and a PATCH or two
Date Sat, 25 Oct 1997 11:40:02 GMT
My votes (after testing on NT):

* "serialised accept" (PR#467) +1, with the appended patch (to be applied
  afterwards) for NT. NT also uses NO_SERIALISED_ACCEPT, but that's ok
  because it doesn't have multiple processes (or threads) competing for
  sockets.

* "ensure config errors/warnings are logged" +1.

Dean also committed a patch to map stderr onto the error log file, with
#ifdef WIN32 protectors. This code works fine on NT, so the second patch
below activates this code for NT as well as Unix. So we have consistent
behaviour (which is good) and error log messages on NT go to the error log
after it is opened (which is also good). 

//pcs

Patch 1 - apply after the "serialised accept" patch to remove
          spurious warning on NT

--- http_main.c	Sat Oct 25 11:27:26 1997
+++ http_main.c.p2	Sat Oct 25 11:26:44 1997
@@ -609,11 +609,15 @@
 /* Default --- no serialization.  Other methods *could* go here,
  * as #elifs...
  */
+#if !defined(MULTITHREAD)
+/* Multithreaded systems don't complete between processes for
+ * the sockets. */
 #define NO_SERIALIZED_ACCEPT
 #define accept_mutex_cleanup()
 #define accept_mutex_init(x)
 #define accept_mutex_on()
 #define accept_mutex_off()
+#endif
 #endif
 
 /* On some architectures it's safe to do unserialized accept()s in the


Patch 2 - activation the "replace stderr with error_log" patch
          for NT. It really works (including opening /dev/null). Gulp.

Index: http_log.c
===================================================================
RCS file: /export/home/cvs/apachen/src/main/http_log.c,v
retrieving revision 1.41
diff -u -r1.41 http_log.c
--- http_log.c	1997/10/22 20:29:38	1.41
+++ http_log.c	1997/10/25 11:23:55
@@ -226,13 +226,10 @@
 void open_logs (server_rec *s_main, pool *p)
 {
     server_rec *virt, *q;
-#ifndef WIN32
     int replace_stderr;
-#endif
 
     open_error_log (s_main, p);
 
-#ifndef WIN32
     replace_stderr = 1;
     if (s_main->error_log) {
 	/* replace stderr with this new log */
@@ -252,7 +249,6 @@
 	aplog_error(APLOG_MARK, APLOG_CRIT, s_main,
 	    "unable to replace stderr with /dev/null");
     }
-#endif
 
     for (virt = s_main->next; virt; virt = virt->next) {
 	if (virt->error_fname)



Mime
View raw message