37 #ifndef APACHE_MPM_COMMON_H
38 #define APACHE_MPM_COMMON_H
44 #if APR_HAVE_NETINET_TCP_H
45 #include <netinet/tcp.h>
62 #ifndef DEFAULT_LISTENBACKLOG
63 #define DEFAULT_LISTENBACKLOG 511
67 #define AP_SIG_GRACEFUL SIGUSR1
70 #define AP_SIG_GRACEFUL_SHORT USR1
73 #define AP_SIG_GRACEFUL_STRING "SIGUSR1"
76 #define AP_SIG_GRACEFUL_STOP SIGWINCH
79 #define AP_SIG_GRACEFUL_STOP_SHORT WINCH
82 #define AP_SIG_GRACEFUL_STOP_STRING "SIGWINCH"
92 #if (!defined(WIN32) && !defined(NETWARE)) || defined(DOXYGEN)
190 #if defined(TCP_NODELAY)
200 #define ap_sock_disable_nagle(s)
223 #ifndef HAVE_INITGROUPS
233 int initgroups(
const char *
name, gid_t basegid);
236 #if (!defined(WIN32) && !defined(NETWARE)) || defined(DOXYGEN)
281 #define AP_MPM_PODX_RESTART_CHAR '$'
282 #define AP_MPM_PODX_GRACEFUL_CHAR '!'
369 #define AP_GRACEFUL_SHUTDOWN_TIMEOUT_COMMAND \
370 AP_INIT_TAKE1("GracefulShutdownTimeout", ap_mpm_set_graceful_shutdown, NULL, \
371 RSRC_CONF, "Maximum time in seconds to wait for child " \
372 "processes to complete transactions during shutdown")
390 #if defined(AP_ENABLE_EXCEPTION_HOOK) && AP_ENABLE_EXCEPTION_HOOK
391 extern const char *ap_mpm_set_exception_hook(
cmd_parms *cmd,
void *dummy,
542 #define AP_ACCEPT_MUTEX_TYPE "mpm-accept"
Symbol export macros and hook functions.
#define AP_DECLARE_HOOK(ret, name, args)
Definition: ap_hooks.h:74
Apache Multi-Processing Module library.
APR Process Locking Routines.
#define MAX_STRING_LEN
Definition: httpd.h:305
mpm_child_status
Definition: ap_mpm.h:255
void() ap_mpm_callback_fn_t(void *baton)
Definition: ap_mpm.h:202
gid_t ap_gname2id(const char *name)
void ap_wait_or_timeout(apr_exit_why_e *status, int *exitcode, apr_proc_t *ret, apr_pool_t *p, server_rec *s)
const char * ap_mpm_set_pidfile(cmd_parms *cmd, void *dummy, const char *arg)
void mpm_common_pre_config(apr_pool_t *pconf)
apr_status_t mpm_register_poll_callback_timeout(apr_pool_t *p, const apr_array_header_t *pds, ap_mpm_callback_fn_t *cbfn, ap_mpm_callback_fn_t *tofn, void *baton, apr_time_t timeout)
void child_stopped(apr_pool_t *pchild, int graceful)
void ap_mpm_rewrite_args(process_rec *)
apr_status_t ap_mpm_safe_kill(pid_t pid, int sig)
AP_DECLARE_DATA char ap_coredump_dir[MAX_STRING_LEN]
int ap_sys_privileges_handlers(int inc)
apr_status_t ap_mpm_pod_open(apr_pool_t *p, ap_pod_t **pod)
apr_status_t ap_mpm_pod_close(ap_pod_t *pod)
apr_status_t ap_mpm_pod_signal(ap_pod_t *pod)
int ap_unregister_extra_mpm_process(pid_t pid, ap_generation_t *old_gen)
AP_DECLARE_DATA const char * ap_pid_fname
AP_DECLARE_DATA apr_size_t ap_thread_stacksize
const char * ap_mpm_set_coredumpdir(cmd_parms *cmd, void *dummy, const char *arg)
const char * ap_mpm_set_max_requests(cmd_parms *cmd, void *dummy, const char *arg)
int ap_signal_server(int *, apr_pool_t *)
const char * ap_check_mpm(void)
void ap_relieve_child_processes(ap_reclaim_callback_fn_t *mpm_callback)
int ap_process_child_status(apr_proc_t *pid, apr_exit_why_e why, int status)
void ap_reclaim_child_processes(int terminate, ap_reclaim_callback_fn_t *mpm_callback)
#define ap_sock_disable_nagle(s)
Definition: mpm_common.h:200
apr_status_t ap_fatal_signal_child_setup(server_rec *s)
void ap_mpm_pod_killpg(ap_pod_t *pod, int num)
void ap_reclaim_callback_fn_t(int childnum, pid_t pid, ap_generation_t gen)
Definition: mpm_common.h:89
void ap_mpm_podx_killpg(ap_pod_t *pod, int num, ap_podx_restart_t graceful)
const char * ap_mpm_set_max_mem_free(cmd_parms *cmd, void *dummy, const char *arg)
void child_stopping(apr_pool_t *pchild, int graceful)
AP_DECLARE_DATA apr_uint32_t ap_max_mem_free
void ap_mpm_dump_pidfile(apr_pool_t *p, apr_file_t *out)
void ap_register_extra_mpm_process(pid_t pid, ap_generation_t gen)
void ap_core_child_status(server_rec *s, pid_t pid, ap_generation_t gen, int slot, mpm_child_status status)
apr_status_t ap_fatal_signal_setup(server_rec *s, apr_pool_t *in_pconf)
int ap_mpm_podx_check(ap_pod_t *pod)
apr_status_t ap_mpm_podx_signal(ap_pod_t *pod, ap_podx_restart_t graceful)
apr_status_t ap_mpm_podx_close(ap_pod_t *pod)
apr_status_t ap_mpm_end_gen_helper(void *unused)
ap_podx_restart_t
Definition: mpm_common.h:284
apr_status_t ap_mpm_pod_check(ap_pod_t *pod)
const char * ap_mpm_set_thread_stacksize(cmd_parms *cmd, void *dummy, const char *arg)
AP_DECLARE_DATA int ap_coredumpdir_configured
const char * ap_mpm_set_graceful_shutdown(cmd_parms *cmd, void *dummy, const char *arg)
apr_status_t ap_mpm_podx_open(apr_pool_t *p, ap_pod_t **pod)
AP_DECLARE_DATA int ap_graceful_shutdown_timeout
AP_DECLARE_DATA int ap_max_requests_per_child
uid_t ap_uname2id(const char *name)
int drop_privileges(apr_pool_t *pchild, server_rec *s)
@ AP_MPM_PODX_NORESTART
Definition: mpm_common.h:284
@ AP_MPM_PODX_RESTART
Definition: mpm_common.h:284
@ AP_MPM_PODX_GRACEFUL
Definition: mpm_common.h:284
request_rec * r
Definition: mod_dav.h:518
int status
Definition: mod_dav.h:141
const char * s
Definition: mod_dav.h:1327
const char * name
Definition: mod_dav.h:805
int apr_status_t
Definition: apr_errno.h:44
struct apr_pool_t apr_pool_t
Definition: apr_pools.h:60
apr_exit_why_e
Definition: apr_thread_proc.h:66
apr_int64_t apr_time_t
Definition: apr_time.h:45
apr_status_t mpm_resume_suspended(conn_rec *)
int input_pending(conn_rec *c)
void resume_connection(conn_rec *c, request_rec *r)
int monitor(apr_pool_t *p, server_rec *s)
apr_status_t mpm_register_timed_callback(apr_time_t t, ap_mpm_callback_fn_t *cbfn, void *baton)
const char * mpm_get_name(void)
int output_pending(conn_rec *c)
int mpm_query(int query_code, int *result, apr_status_t *rv)
void suspend_connection(conn_rec *c, request_rec *r)
apr_status_t mpm_register_poll_callback(apr_pool_t *p, const apr_array_header_t *pds, ap_mpm_callback_fn_t *cbfn, void *baton)
#define AP_DECLARE_DATA
Definition: macros.h:15
#define AP_DECLARE(x)
Definition: macros.h:1
Apache scoreboard library.
int ap_generation_t
Definition: scoreboard.h:78
Definition: mpm_common.h:240
apr_file_t * pod_in
Definition: mpm_common.h:241
apr_pool_t * p
Definition: mpm_common.h:243
apr_file_t * pod_out
Definition: mpm_common.h:242
Definition: apr_arch_file_io.h:107
Definition: apr_thread_proc.h:134
Definition: apr_arch_networkio.h:37
Definition: http_config.h:288
Structure to store things which are per connection.
Definition: httpd.h:1193
A structure that represents one process.
Definition: httpd.h:840
A structure that represents the current request.
Definition: httpd.h:856
A structure to store information for each virtual server.
Definition: httpd.h:1382