|
Apache HTTPD
|
Classes | |
| struct | ap_pod_t |
| struct | ap_LINK_monitor_t |
| struct | ap_LINK_drop_privileges_t |
| struct | ap_LINK_mpm_query_t |
| struct | ap_LINK_mpm_register_timed_callback_t |
| struct | ap_LINK_mpm_get_name_t |
| struct | ap_LINK_suspend_connection_t |
| struct | ap_LINK_resume_connection_t |
| struct | ap_LINK_child_stopping_t |
Enumerations | |
| enum | ap_podx_restart_t { AP_MPM_PODX_NORESTART , AP_MPM_PODX_RESTART , AP_MPM_PODX_GRACEFUL } |
Definition at line 467 of file mpm_common.h.
| #define AP_GRACEFUL_SHUTDOWN_TIMEOUT_COMMAND |
Definition at line 369 of file mpm_common.h.
| #define AP_MPM_PODX_GRACEFUL_CHAR '!' |
Definition at line 282 of file mpm_common.h.
| #define AP_MPM_PODX_RESTART_CHAR '$' |
Definition at line 281 of file mpm_common.h.
Definition at line 67 of file mpm_common.h.
Definition at line 70 of file mpm_common.h.
Definition at line 76 of file mpm_common.h.
Definition at line 79 of file mpm_common.h.
| #define AP_SIG_GRACEFUL_STOP_STRING "SIGWINCH" |
Definition at line 82 of file mpm_common.h.
| #define AP_SIG_GRACEFUL_STRING "SIGUSR1" |
Definition at line 73 of file mpm_common.h.
Definition at line 200 of file mpm_common.h.
| #define DEFAULT_LISTENBACKLOG 511 |
Definition at line 63 of file mpm_common.h.
| typedef void ap_HOOK_child_stopping_t(apr_pool_t *pchild, int graceful) |
Notification that the child is stopping. If graceful, ongoing requests will be served.
| pchild | The child pool |
| graceful | != 0 iff this is a graceful shutdown. |
Definition at line 462 of file mpm_common.h.
| typedef int ap_HOOK_drop_privileges_t(apr_pool_t *pchild, server_rec *s) |
Definition at line 399 of file mpm_common.h.
| typedef int ap_HOOK_monitor_t(apr_pool_t *p, server_rec *s) |
Definition at line 395 of file mpm_common.h.
Definition at line 412 of file mpm_common.h.
| typedef int ap_HOOK_mpm_query_t(int query_code, int *result, apr_status_t *rv) |
Definition at line 405 of file mpm_common.h.
| typedef apr_status_t ap_HOOK_mpm_register_timed_callback_t(apr_time_t t, ap_mpm_callback_fn_t *cbfn, void *baton) |
Definition at line 409 of file mpm_common.h.
| typedef void ap_reclaim_callback_fn_t(int childnum, pid_t pid, ap_generation_t gen) |
Callback function used for ap_reclaim_child_processes() and ap_relieve_child_processes(). The callback function will be called for each terminated child process.
Definition at line 89 of file mpm_common.h.
| Enumerator | |
|---|---|
| AP_MPM_PODX_NORESTART | |
| AP_MPM_PODX_RESTART | |
| AP_MPM_PODX_GRACEFUL | |
Definition at line 284 of file mpm_common.h.
Check that exactly one MPM is loaded Returns NULL if yes, error string if not.
Definition at line 559 of file mpm_common.c.
|
extern |
Definition at line 477 of file mpm_common.c.
| apr_status_t ap_fatal_signal_child_setup | ( | server_rec * | s | ) |
Definition at line 1011 of file mpm_unix.c.
| apr_status_t ap_fatal_signal_setup | ( | server_rec * | s, |
| apr_pool_t * | in_pconf | ||
| ) |
Definition at line 1044 of file mpm_unix.c.
| void ap_hook_child_stopping | ( | ap_HOOK_child_stopping_t * | pf, |
| const char *const * | aszPre, | ||
| const char *const * | aszSucc, | ||
| int | nOrder | ||
| ) |
Definition at line 118 of file mpm_common.c.
| void ap_hook_drop_privileges | ( | ap_HOOK_drop_privileges_t * | pf, |
| const char *const * | aszPre, | ||
| const char *const * | aszSucc, | ||
| int | nOrder | ||
| ) |
Definition at line 94 of file mpm_common.c.
| apr_array_header_t * ap_hook_get_child_stopping | ( | void | ) |
Definition at line 118 of file mpm_common.c.
| apr_array_header_t * ap_hook_get_drop_privileges | ( | void | ) |
Definition at line 94 of file mpm_common.c.
| apr_array_header_t * ap_hook_get_monitor | ( | void | ) |
Definition at line 91 of file mpm_common.c.
| apr_array_header_t * ap_hook_get_mpm_get_name | ( | void | ) |
Definition at line 136 of file mpm_common.c.
| apr_array_header_t * ap_hook_get_mpm_query | ( | void | ) |
Definition at line 100 of file mpm_common.c.
| apr_array_header_t * ap_hook_get_mpm_register_timed_callback | ( | void | ) |
Definition at line 103 of file mpm_common.c.
| apr_array_header_t * ap_hook_get_resume_connection | ( | void | ) |
Definition at line 115 of file mpm_common.c.
| apr_array_header_t * ap_hook_get_suspend_connection | ( | void | ) |
Definition at line 112 of file mpm_common.c.
| void ap_hook_monitor | ( | ap_HOOK_monitor_t * | pf, |
| const char *const * | aszPre, | ||
| const char *const * | aszSucc, | ||
| int | nOrder | ||
| ) |
Definition at line 91 of file mpm_common.c.
| void ap_hook_mpm_get_name | ( | ap_HOOK_mpm_get_name_t * | pf, |
| const char *const * | aszPre, | ||
| const char *const * | aszSucc, | ||
| int | nOrder | ||
| ) |
Definition at line 136 of file mpm_common.c.
| void ap_hook_mpm_query | ( | ap_HOOK_mpm_query_t * | pf, |
| const char *const * | aszPre, | ||
| const char *const * | aszSucc, | ||
| int | nOrder | ||
| ) |
Definition at line 100 of file mpm_common.c.
| void ap_hook_mpm_register_timed_callback | ( | ap_HOOK_mpm_register_timed_callback_t * | pf, |
| const char *const * | aszPre, | ||
| const char *const * | aszSucc, | ||
| int | nOrder | ||
| ) |
Definition at line 103 of file mpm_common.c.
| void ap_hook_resume_connection | ( | ap_HOOK_resume_connection_t * | pf, |
| const char *const * | aszPre, | ||
| const char *const * | aszSucc, | ||
| int | nOrder | ||
| ) |
Definition at line 115 of file mpm_common.c.
| void ap_hook_suspend_connection | ( | ap_HOOK_suspend_connection_t * | pf, |
| const char *const * | aszPre, | ||
| const char *const * | aszSucc, | ||
| int | nOrder | ||
| ) |
Definition at line 112 of file mpm_common.c.
| void ap_mpm_dump_pidfile | ( | apr_pool_t * | p, |
| apr_file_t * | out | ||
| ) |
Definition at line 316 of file mpm_common.c.
| apr_status_t ap_mpm_end_gen_helper | ( | void * | unused | ) |
Pool cleanup for end-generation hook implementation (core httpd function)
Definition at line 441 of file mpm_common.c.
| apr_status_t ap_mpm_pod_check | ( | ap_pod_t * | pod | ) |
Check the pipe to determine if the process has been signalled to die.
Definition at line 468 of file mpm_unix.c.
| apr_status_t ap_mpm_pod_close | ( | ap_pod_t * | pod | ) |
Close the pipe-of-death
| pod | the pipe-of-death to close. |
Definition at line 487 of file mpm_unix.c.
Write data to the pipe-of-death, signalling that all child process should die.
| pod | The pipe-of-death to write to. |
| num | The number of child processes to kill |
Definition at line 743 of file mpm_unix.c.
| apr_status_t ap_mpm_pod_open | ( | apr_pool_t * | p, |
| ap_pod_t ** | pod | ||
| ) |
Open the pipe-of-death. The pipe of death is used to tell all child processes that it is time to die gracefully.
| p | The pool to use for allocating the pipe |
| pod | the pipe-of-death that is created. |
Definition at line 447 of file mpm_unix.c.
| apr_status_t ap_mpm_pod_signal | ( | ap_pod_t * | pod | ) |
Write data to the pipe-of-death, signalling that one child process should die.
| pod | the pipe-of-death to write to. |
Definition at line 731 of file mpm_unix.c.
Check the extended pipe to determine if the process has been signalled to die.
Definition at line 540 of file mpm_unix.c.
| apr_status_t ap_mpm_podx_close | ( | ap_pod_t * | pod | ) |
Close the pipe-of-death
| pod | The pipe-of-death to close. |
Definition at line 562 of file mpm_unix.c.
| void ap_mpm_podx_killpg | ( | ap_pod_t * | pod, |
| int | num, | ||
| ap_podx_restart_t | graceful | ||
| ) |
Write data to the extended pipe-of-death, signalling that all child process should die.
| pod | The pipe-of-death to write to. |
| num | The number of child processes to kill |
| graceful | restart-type |
Definition at line 609 of file mpm_unix.c.
| apr_status_t ap_mpm_podx_open | ( | apr_pool_t * | p, |
| ap_pod_t ** | pod | ||
| ) |
Open the extended pipe-of-death.
| p | The pool to use for allocating the pipe |
| pod | The pipe-of-death that is created. |
Definition at line 519 of file mpm_unix.c.
| apr_status_t ap_mpm_podx_signal | ( | ap_pod_t * | pod, |
| ap_podx_restart_t | graceful | ||
| ) |
Write data to the extended pipe-of-death, signalling that one child process should die.
| pod | the pipe-of-death to write to. |
| graceful | restart-type |
Definition at line 603 of file mpm_unix.c.
| void ap_mpm_rewrite_args | ( | process_rec * | process | ) |
Definition at line 872 of file mpm_unix.c.
| apr_status_t ap_mpm_safe_kill | ( | pid_t | pid, |
| int | sig | ||
| ) |
Safely signal an MPM child process, if the process is in the current process group. Otherwise fail.
| pid | the process id of a child process to signal |
| sig | the signal number to send |
Definition at line 331 of file mpm_unix.c.
< Forbidden in <VirtualHost>
< Forbidden in <Limit>
< Forbidden in <Directory>
< Forbidden in <Location>
< Forbidden in <Files> or <If>
< Forbidden in <Proxy>
< Type
Definition at line 341 of file mpm_common.c.
< Forbidden in <VirtualHost>
< Forbidden in <Limit>
< Forbidden in <Directory>
< Forbidden in <Location>
< Forbidden in <Files> or <If>
< Forbidden in <Proxy>
Definition at line 369 of file mpm_common.c.
< Forbidden in <VirtualHost>
< Forbidden in <Limit>
< Forbidden in <Directory>
< Forbidden in <Location>
< Forbidden in <Files> or <If>
< Forbidden in <Proxy>
Definition at line 381 of file mpm_common.c.
< Forbidden in <VirtualHost>
< Forbidden in <Limit>
< Forbidden in <Directory>
< Forbidden in <Location>
< Forbidden in <Files> or <If>
< Forbidden in <Proxy>
Definition at line 322 of file mpm_common.c.
< Forbidden in <VirtualHost>
< Forbidden in <Limit>
< Forbidden in <Directory>
< Forbidden in <Location>
< Forbidden in <Files> or <If>
< Forbidden in <Proxy>
Definition at line 300 of file mpm_common.c.
< Forbidden in <VirtualHost>
< Forbidden in <Limit>
< Forbidden in <Directory>
< Forbidden in <Location>
< Forbidden in <Files> or <If>
< Forbidden in <Proxy>
Definition at line 401 of file mpm_common.c.
| int ap_process_child_status | ( | apr_proc_t * | pid, |
| apr_exit_why_e | why, | ||
| int | status | ||
| ) |
Log why a child died to the error log, if the child died without the parent signalling it.
| pid | The child that has died |
| why | The return code of the child process |
| status | The status returned from ap_wait_or_timeout |
Definition at line 386 of file mpm_unix.c.
| void ap_reclaim_child_processes | ( | int | terminate, |
| ap_reclaim_callback_fn_t * | mpm_callback | ||
| ) |
Make sure all child processes that have been spawned by the parent process have died. This includes process registered as "other_children".
| 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. |
| mpm_callback | Callback invoked for each dead child process |
Definition at line 184 of file mpm_unix.c.
| void ap_register_extra_mpm_process | ( | pid_t | pid, |
| ap_generation_t | gen | ||
| ) |
Tell ap_reclaim_child_processes() and ap_relieve_child_processes() about an MPM child process which has no entry in the scoreboard.
| pid | The process id of an MPM child process which should be reclaimed when ap_reclaim_child_processes() is called. |
| gen | The generation of this MPM child process. |
Definition at line 82 of file mpm_unix.c.
| void ap_relieve_child_processes | ( | ap_reclaim_callback_fn_t * | mpm_callback | ) |
Catch any child processes that have been spawned by the parent process which have exited. This includes processes registered as "other_children".
| mpm_callback | Callback invoked for each dead child process |
Definition at line 286 of file mpm_unix.c.
| void ap_run_child_stopping | ( | apr_pool_t * | pchild, |
| int | graceful | ||
| ) |
Definition at line 118 of file mpm_common.c.
| int ap_run_drop_privileges | ( | apr_pool_t * | pchild, |
| server_rec * | s | ||
| ) |
< Module has handled this stage.
< Module has handled this stage.
< Module declines to handle
< Module has handled this stage.
Definition at line 94 of file mpm_common.c.
| int ap_run_monitor | ( | apr_pool_t * | p, |
| server_rec * | s | ||
| ) |
< Module has handled this stage.
< Module has handled this stage.
< Module declines to handle
< Module has handled this stage.
Definition at line 91 of file mpm_common.c.
Definition at line 136 of file mpm_common.c.
| int ap_run_mpm_query | ( | int | query_code, |
| int * | result, | ||
| apr_status_t * | rv | ||
| ) |
< Module declines to handle
< Module declines to handle
Definition at line 100 of file mpm_common.c.
| apr_status_t ap_run_mpm_register_timed_callback | ( | apr_time_t | t, |
| ap_mpm_callback_fn_t * | cbfn, | ||
| void * | baton | ||
| ) |
Definition at line 103 of file mpm_common.c.
| void ap_run_resume_connection | ( | conn_rec * | c, |
| request_rec * | r | ||
| ) |
Definition at line 115 of file mpm_common.c.
| void ap_run_suspend_connection | ( | conn_rec * | c, |
| request_rec * | r | ||
| ) |
Definition at line 112 of file mpm_common.c.
| int ap_signal_server | ( | int * | exit_status, |
| apr_pool_t * | pconf | ||
| ) |
Definition at line 784 of file mpm_unix.c.
| int ap_unregister_extra_mpm_process | ( | pid_t | pid, |
| ap_generation_t * | old_gen | ||
| ) |
Unregister an MPM child process which was previously registered by a call to ap_register_extra_mpm_process().
| pid | The process id of an MPM child process which no longer needs to be reclaimed. |
| old_gen | Set to the server generation of the process, if found. |
Definition at line 92 of file mpm_unix.c.
| void ap_wait_or_timeout | ( | apr_exit_why_e * | status, |
| int * | exitcode, | ||
| apr_proc_t * | ret, | ||
| apr_pool_t * | p, | ||
| server_rec * | s | ||
| ) |
Run the monitor hook (once every ten calls), determine if any child process has died and, if none died, sleep one second.
| status | The return code if a process has died |
| exitcode | The returned exit status of the child, if a child process dies, or the signal that caused the child to die. |
| ret | The process id of the process that died |
| p | The pool to allocate out of |
| s | The server_rec to pass |
Definition at line 181 of file mpm_common.c.
The initgroups() function initializes the group access list by reading the group database /etc/group and using all groups of which user is a member. The additional group basegid is also added to the list.
| name | The user name - must be non-NULL |
| basegid | The basegid to add |
Definition at line 267 of file mpm_common.c.
| void mpm_common_pre_config | ( | apr_pool_t * | pconf | ) |
Definition at line 164 of file mpm_common.c.
|
extern |
Definition at line 152 of file mpm_common.c.
|
extern |
Definition at line 153 of file mpm_common.c.
|
extern |
Set the timeout period for a graceful shutdown.
Definition at line 154 of file mpm_common.c.
|
extern |
Definition at line 155 of file mpm_common.c.
|
extern |
The maximum number of requests each child thread or process handles before dying off
Definition at line 151 of file mpm_common.c.
The filename used to store the process id.
Definition at line 150 of file mpm_common.c.
|
extern |
Definition at line 156 of file mpm_common.c.