From: William A. Rowe Jr Date: Wed, 25 Mar 2009 18:00:26 +0000 (+0000) Subject: no longer conditional; although some are now in mpm_unix.c X-Git-Tag: 2.3.3~815 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6430f7f3a1851b60fc560cdcc97313903fb23ded;p=apache no longer conditional; although some are now in mpm_unix.c git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758371 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/include/mpm_common.h b/include/mpm_common.h index 1d02a9371b..506e92c146 100644 --- a/include/mpm_common.h +++ b/include/mpm_common.h @@ -44,16 +44,7 @@ #include /* for TCP_NODELAY */ #endif -#ifdef WIN32 -/* XXX temporary mitigation for Windows; other non-Unix MPMs need this hack too - * include mpm.h to pick up the AP_MPM_NO_foo definitions - */ -#include "mpm.h" -#endif - -#ifndef AP_MPM_NO_SET_ACCEPT_LOCK_MECH #include "apr_proc_mutex.h" -#endif #ifdef __cplusplus extern "C" { @@ -103,9 +94,7 @@ extern "C" { * in the scoreboard as well as those currently registered via * ap_register_extra_mpm_process(). */ -#ifndef AP_MPM_NO_RECLAIM_CHILD_PROCESSES void ap_reclaim_child_processes(int terminate); -#endif /** * Catch any child processes that have been spawned by the parent process @@ -118,9 +107,7 @@ void ap_reclaim_child_processes(int terminate); * in the scoreboard as well as those currently registered via * ap_register_extra_mpm_process(). */ -#ifndef AP_MPM_NO_RECLAIM_CHILD_PROCESSES void ap_relieve_child_processes(void); -#endif /** * Tell ap_reclaim_child_processes() and ap_relieve_child_processes() about @@ -131,9 +118,7 @@ void ap_relieve_child_processes(void); * ap_reclaim_child_processes(), remove it from the list of such processes * by calling ap_unregister_extra_mpm_process(). */ -#ifndef AP_MPM_NO_RECLAIM_CHILD_PROCESSES void ap_register_extra_mpm_process(pid_t pid); -#endif /** * Unregister an MPM child process which was previously registered by a @@ -142,9 +127,7 @@ void ap_register_extra_mpm_process(pid_t pid); * be reclaimed. * @return 1 if the process was found and removed, 0 otherwise */ -#ifndef AP_MPM_NO_RECLAIM_CHILD_PROCESSES int ap_unregister_extra_mpm_process(pid_t pid); -#endif /** * Safely signal an MPM child process, if the process is in the @@ -155,9 +138,7 @@ int ap_unregister_extra_mpm_process(pid_t pid); * APR_EINVAL is returned if passed either an invalid (< 1) pid, or if * the pid is not in the current process group */ -#ifndef AP_MPM_NO_RECLAIM_CHILD_PROCESSES apr_status_t ap_mpm_safe_kill(pid_t pid, int sig); -#endif /** * Determine if any child process has died. If no child process died, then @@ -167,10 +148,8 @@ apr_status_t ap_mpm_safe_kill(pid_t pid, int sig); * @param ret The process id of the process that died * @param p The pool to allocate out of */ -#ifndef AP_MPM_NO_WAIT_OR_TIMEOUT void ap_wait_or_timeout(apr_exit_why_e *status, int *exitcode, apr_proc_t *ret, apr_pool_t *p); -#endif /** * Log why a child died to the error log, if the child died without the @@ -179,9 +158,7 @@ void ap_wait_or_timeout(apr_exit_why_e *status, int *exitcode, apr_proc_t *ret, * @param status The status returned from ap_wait_or_timeout * @return 0 on success, APEXIT_CHILDFATAL if MPM should terminate */ -#ifndef AP_MPM_NO_PROCESS_CHILD_STATUS int ap_process_child_status(apr_proc_t *pid, apr_exit_why_e why, int status); -#endif #if defined(TCP_NODELAY) && !defined(MPE) && !defined(TPF) /** @@ -218,8 +195,6 @@ AP_DECLARE(gid_t) ap_gname2id(const char *name); #define AP_MPM_HARD_LIMITS_FILE APACHE_MPM_DIR "/mpm_default.h" -#ifndef AP_MPM_NO_POD - typedef struct ap_pod_t ap_pod_t; struct ap_pod_t { @@ -259,7 +234,6 @@ AP_DECLARE(apr_status_t) ap_mpm_pod_signal(ap_pod_t *pod); * @param num The number of child processes to kill */ AP_DECLARE(void) ap_mpm_pod_killpg(ap_pod_t *pod, int num); -#endif /* * These data members are common to all mpms. Each new mpm @@ -272,61 +246,48 @@ AP_DECLARE(void) ap_mpm_pod_killpg(ap_pod_t *pod, int num); * The maximum number of requests each child thread or * process handles before dying off */ -#ifndef AP_MPM_NO_SET_MAX_REQUESTS extern int ap_max_requests_per_child; const char *ap_mpm_set_max_requests(cmd_parms *cmd, void *dummy, const char *arg); -#endif /** * The filename used to store the process id. */ -#ifndef AP_MPM_NO_SET_PIDFILE extern const char *ap_pid_fname; const char *ap_mpm_set_pidfile(cmd_parms *cmd, void *dummy, const char *arg); -#endif /** * The name of lockfile used when Apache needs to lock the accept() call. */ -#ifndef AP_MPM_NO_SET_LOCKFILE extern const char *ap_lock_fname; const char *ap_mpm_set_lockfile(cmd_parms *cmd, void *dummy, const char *arg); -#endif /** * The system mutex implementation to use for the accept mutex. */ -#ifndef AP_MPM_NO_SET_ACCEPT_LOCK_MECH extern apr_lockmech_e ap_accept_lock_mech; const char *ap_mpm_set_accept_lock_mech(cmd_parms *cmd, void *dummy, const char *arg); -#endif /* * Set the scorboard file. */ -#ifndef AP_MPM_NO_SET_SCOREBOARD const char *ap_mpm_set_scoreboard(cmd_parms *cmd, void *dummy, const char *arg); -#endif /* * The directory that the server changes directory to dump core. */ -#ifndef AP_MPM_NO_SET_COREDUMPDIR extern char ap_coredump_dir[MAX_STRING_LEN]; extern int ap_coredumpdir_configured; const char *ap_mpm_set_coredumpdir(cmd_parms *cmd, void *dummy, const char *arg); -#endif /** * Set the timeout period for a graceful shutdown. */ -#ifndef AP_MPM_NO_SET_GRACEFUL_SHUTDOWN extern int ap_graceful_shutdown_timeout; const char *ap_mpm_set_graceful_shutdown(cmd_parms *cmd, void *dummy, const char *arg); @@ -334,40 +295,29 @@ const char *ap_mpm_set_graceful_shutdown(cmd_parms *cmd, void *dummy, AP_INIT_TAKE1("GracefulShutdownTimeout", ap_mpm_set_graceful_shutdown, NULL, \ RSRC_CONF, "Maximum time in seconds to wait for child " \ "processes to complete transactions during shutdown") -#endif -#ifndef AP_MPM_NO_SIGNAL_SERVER int ap_signal_server(int *, apr_pool_t *); void ap_mpm_rewrite_args(process_rec *); -#endif -#ifndef AP_MPM_NO_SET_MAX_MEM_FREE extern apr_uint32_t ap_max_mem_free; extern const char *ap_mpm_set_max_mem_free(cmd_parms *cmd, void *dummy, const char *arg); -#endif -#ifndef AP_MPM_NO_SET_STACKSIZE extern apr_size_t ap_thread_stacksize; extern const char *ap_mpm_set_thread_stacksize(cmd_parms *cmd, void *dummy, const char *arg); -#endif -#ifndef AP_MPM_NO_FATAL_SIGNAL_HANDLER extern apr_status_t ap_fatal_signal_setup(server_rec *s, apr_pool_t *pconf); extern apr_status_t ap_fatal_signal_child_setup(server_rec *s); -#endif #if AP_ENABLE_EXCEPTION_HOOK extern const char *ap_mpm_set_exception_hook(cmd_parms *cmd, void *dummy, const char *arg); #endif -#ifndef AP_MPM_NO_CHILD_PID -extern pid_t ap_mpm_get_child_pid(int childnum); -extern apr_status_t ap_mpm_note_child_killed(int childnum); -#endif +AP_DECLARE(pid_t) ap_mpm_get_child_pid(int childnum); +AP_DECLARE(apr_status_t) ap_mpm_note_child_killed(int childnum); AP_DECLARE_HOOK(int,monitor,(apr_pool_t *p))