The purpose of this patch is to add a couple of warning mesages following
testing of the configuration directives that control the behavior of the
prefork mpm.

-- 
Cody Sherr

Engineer
Covalent Technologies

phone: (415)536-5292
email: [EMAIL PROTECTED]

Index: server/mpm/prefork/prefork.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/server/mpm/prefork/prefork.c,v
retrieving revision 1.197
diff -u -r1.197 prefork.c
--- server/mpm/prefork/prefork.c        2001/08/19 05:48:19     1.197
+++ server/mpm/prefork/prefork.c        2001/08/20 23:51:43
@@ -1113,8 +1113,9 @@
     ap_log_pid(pconf, ap_pid_fname);

     if (setup_listeners(s)) {
-       /* XXX: hey, what's the right way for the mpm to indicate a fatal error? */
-       return 1;
+       ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
+                    "Could not setup listening sockets.");
+       return 1;
     }
     if ((rv = ap_mpm_pod_open(pconf, &pod))) {
         ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
@@ -1364,6 +1365,16 @@
     }

     ap_daemons_to_start = atoi(arg);
+
+    if (ap_daemons_to_start <= 0) {
+       ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL,
+                    "WARNING: detected StartServers set to non-positive.");
+       ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL,
+                    "Will use MinSpareServers instead.");
+       ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL,
+                    "Please read the documentation.");
+    }
+
     return NULL;
 }



Reply via email to