/**
* 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
*/
/**
* 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.
/**
* 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
/**
* 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
/**
* 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
}
#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;
}
}
#endif
-#endif
#endif
return OK;
}
#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,
}
}
#endif
-#endif
#endif
return 0;
}
/*
* 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"),
" %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,