]> granicus.if.org Git - apache/commitdiff
axe the remaining checks of AP_MPM_WANT_foo to see what code to generate
authorJeff Trawick <trawick@apache.org>
Tue, 24 Mar 2009 20:52:10 +0000 (20:52 +0000)
committerJeff Trawick <trawick@apache.org>
Tue, 24 Mar 2009 20:52:10 +0000 (20:52 +0000)
MPMs no longer provide those definitions

(the signal server support is an interesting problem, since it has to be known before loading
loading the MPM)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758014 13f79535-47bb-0310-9956-ffa450edef68

include/http_main.h
include/mpm_common.h
modules/arch/unix/mod_unixd.c
server/core.c
server/main.c

index 38739496efb071ed06493e183870ce839c1ec54c..545ba5ac13b602b3b5b4589a924bdb4143db9020 100644 (file)
@@ -60,7 +60,6 @@ AP_DECLARE_DATA extern apr_array_header_t *ap_server_config_defines;
 /**
  * An optional function to send signal to server on presence of '-k'
  * command line argument.
- * Called if MPM defines AP_MPM_WANT_SIGNAL_SERVER
  * @param status The exit status after sending signal
  * @param pool Memory pool to allocate from
  */
index ebf193ad6b47d208035211f470f14e15658263b7..9c0eeed6dd15713bd173391ddd5913d3eb235a45 100644 (file)
@@ -92,8 +92,6 @@ extern "C" {
 /**
  * Make sure all child processes that have been spawned by the parent process
  * have died.  This includes process registered as "other_children".
- * @warning This is only defined if the MPM defines 
- *          AP_MPM_WANT_RECLAIM_CHILD_PROCESSES
  * @param terminate Either 1 or 0.  If 1, send the child processes SIGTERM
  *        each time through the loop.  If 0, give the process time to die
  *        on its own before signalling it.
@@ -112,8 +110,6 @@ void ap_reclaim_child_processes(int terminate);
 /**
  * Catch any child processes that have been spawned by the parent process
  * which have exited. This includes processes registered as "other_children".
- * @warning This is only defined if the MPM defines 
- *          AP_MPM_WANT_RECLAIM_CHILD_PROCESSES
  * @tip This function requires that some macros are defined by the MPM: <pre>
  *  MPM_CHILD_PID -- Get the pid from the specified spot in the scoreboard
  *  MPM_NOTE_CHILD_KILLED -- Note the child died in the scoreboard
@@ -129,8 +125,6 @@ void ap_relieve_child_processes(void);
 /**
  * Tell ap_reclaim_child_processes() and ap_relieve_child_processes() about 
  * an MPM child process which has no entry in the scoreboard.
- * @warning This is only defined if the MPM defines
- *          AP_MPM_WANT_RECLAIM_CHILD_PROCESSES
  * @param pid The process id of an MPM child process which should be
  * reclaimed when ap_reclaim_child_processes() is called.
  * @tip If an extra MPM child process terminates prior to calling
@@ -144,8 +138,6 @@ void ap_register_extra_mpm_process(pid_t pid);
 /**
  * Unregister an MPM child process which was previously registered by a
  * call to ap_register_extra_mpm_process().
- * @warning This is only defined if the MPM defines
- *          AP_MPM_WANT_RECLAIM_CHILD_PROCESSES
  * @param pid The process id of an MPM child process which no longer needs to
  * be reclaimed.
  * @return 1 if the process was found and removed, 0 otherwise
index 96e27a5dbfd6acf461eaaed58a43fe98749bf267..a33cf4bd9983294d1b97aacd0d2e85324f074a37 100644 (file)
@@ -203,7 +203,6 @@ unixd_drop_privileges(apr_pool_t *pool, server_rec *s)
     }
 #if defined(HAVE_PRCTL) && defined(PR_SET_DUMPABLE)
     /* this applies to Linux 2.4+ */
-#ifdef AP_MPM_WANT_SET_COREDUMPDIR
     if (ap_coredumpdir_configured) {
         if (prctl(PR_SET_DUMPABLE, 1)) {
             rv = errno;
@@ -214,7 +213,6 @@ unixd_drop_privileges(apr_pool_t *pool, server_rec *s)
         }
     }
 #endif
-#endif
 #endif
 
     return OK;
@@ -359,7 +357,6 @@ AP_DECLARE(int) ap_unixd_setup_child(void)
     }
 #if defined(HAVE_PRCTL) && defined(PR_SET_DUMPABLE)
     /* this applies to Linux 2.4+ */
-#ifdef AP_MPM_WANT_SET_COREDUMPDIR
     if (ap_coredumpdir_configured) {
         if (prctl(PR_SET_DUMPABLE, 1)) {
             ap_log_error(APLOG_MARK, APLOG_ALERT, errno, NULL,
@@ -368,7 +365,6 @@ AP_DECLARE(int) ap_unixd_setup_child(void)
         }
     }
 #endif
-#endif
 #endif
     return 0;
 }
index 05319060cc4dd4e740b10f2eff28bd03789eee64..6d9bfad108abab81cd2efdaad8596432bfc4898b 100644 (file)
@@ -3361,41 +3361,26 @@ AP_INIT_FLAG("AllowEncodedSlashes", set_allow2f, NULL, RSRC_CONF,
 
 /*
  * These are default configuration directives that mpms can/should
- * pay attention to. If an mpm wishes to use these, they should
- * #defined them in mpm.h.
+ * pay attention to.
+ * XXX These are not for all platforms, and even some Unix MPMs might not want
+ * some directives.
  */
-#ifdef AP_MPM_WANT_SET_PIDFILE
 AP_INIT_TAKE1("PidFile",  ap_mpm_set_pidfile, NULL, RSRC_CONF,
               "A file for logging the server process ID"),
-#endif
-#ifdef AP_MPM_WANT_SET_SCOREBOARD
 AP_INIT_TAKE1("ScoreBoardFile", ap_mpm_set_scoreboard, NULL, RSRC_CONF,
               "A file for Apache to maintain runtime process management information"),
-#endif
-#ifdef AP_MPM_WANT_SET_LOCKFILE
 AP_INIT_TAKE1("LockFile",  ap_mpm_set_lockfile, NULL, RSRC_CONF,
               "The lockfile used when Apache needs to lock the accept() call (deprecated)"),
-#endif
-#ifdef AP_MPM_WANT_SET_MAX_REQUESTS
 AP_INIT_TAKE1("MaxRequestsPerChild", ap_mpm_set_max_requests, NULL, RSRC_CONF,
               "Maximum number of requests a particular child serves before dying."),
-#endif
-#ifdef AP_MPM_WANT_SET_COREDUMPDIR
 AP_INIT_TAKE1("CoreDumpDirectory", ap_mpm_set_coredumpdir, NULL, RSRC_CONF,
               "The location of the directory Apache changes to before dumping core"),
-#endif
-#ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
 AP_INIT_TAKE1("AcceptMutex", ap_mpm_set_accept_lock_mech, NULL, RSRC_CONF,
               AP_AVAILABLE_MUTEXES_STRING),
-#endif
-#ifdef AP_MPM_WANT_SET_MAX_MEM_FREE
 AP_INIT_TAKE1("MaxMemFree", ap_mpm_set_max_mem_free, NULL, RSRC_CONF,
               "Maximum number of 1k blocks a particular childs allocator may hold."),
-#endif
-#ifdef AP_MPM_WANT_SET_STACKSIZE
 AP_INIT_TAKE1("ThreadStackSize", ap_mpm_set_thread_stacksize, NULL, RSRC_CONF,
               "Size in bytes of stack used by threads handling client connections"),
-#endif
 #if AP_ENABLE_EXCEPTION_HOOK
 AP_INIT_TAKE1("EnableExceptionHook", ap_mpm_set_exception_hook, NULL, RSRC_CONF,
               "Controls whether exception hook may be called after a crash"),
index eb241b6873edff0f5ffb129e742255355e7714f5..c72eb580b1b0ba9ad6e1274ac5dc7daba15e2f39 100644 (file)
@@ -372,17 +372,12 @@ static void usage(process_rec *process)
                  "       %s [-k install|config|uninstall] [-n service_name]",
                  pad);
 #endif
-#ifdef AP_MPM_WANT_SIGNAL_SERVER
-#ifdef AP_MPM_WANT_SET_GRACEFUL_SHUTDOWN
+/* XXX not all MPMs support signalling the server in general or graceful-stop
+ * in particular
+ */
     ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
                  "       %s [-k start|restart|graceful|graceful-stop|stop]",
                  pad);
-#else
-    ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
-                 "       %s [-k start|restart|graceful|stop]",
-                 pad);
-#endif /* AP_MPM_WANT_SET_GRACEFUL_SHUTDOWN */
-#endif
     ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
                  "       %s [-v] [-V] [-h] [-l] [-L] [-t] [-S]", pad);
     ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,