diff options
author | Graham Leggett <minfrin@apache.org> | 2013-11-16 19:24:53 +0000 |
---|---|---|
committer | Graham Leggett <minfrin@apache.org> | 2013-11-16 19:24:53 +0000 |
commit | e9eef7a853855546d56cc8759f44f0696a83f7ba (patch) | |
tree | 89f364054f264f71783cf7e26d5f96205b2b1980 /include/mpm_common.h | |
parent | a5d397db43e3442281614b98326264fc2d3cdcb3 (diff) | |
download | httpd-e9eef7a853855546d56cc8759f44f0696a83f7ba.tar.gz |
mpm_unix: Add ap_mpm_podx_* implementation to avoid code duplication
and align w/ trunk.
trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1409214
http://svn.apache.org/viewvc?view=revision&revision=1410004
2.4.x patch: http://people.apache.org/~jim/patches/httpd-2.4-podx-v2.patch
Submitted by: jim
Reviewed by: rjung, minfrin
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1542557 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/mpm_common.h')
-rw-r--r-- | include/mpm_common.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/include/mpm_common.h b/include/mpm_common.h index 0a98d7009e..8bb0ec5452 100644 --- a/include/mpm_common.h +++ b/include/mpm_common.h @@ -278,6 +278,50 @@ AP_DECLARE(apr_status_t) ap_mpm_pod_signal(ap_pod_t *pod); */ AP_DECLARE(void) ap_mpm_pod_killpg(ap_pod_t *pod, int num); +#define AP_MPM_PODX_RESTART_CHAR '$' +#define AP_MPM_PODX_GRACEFUL_CHAR '!' + +typedef enum { AP_MPM_PODX_NORESTART, AP_MPM_PODX_RESTART, AP_MPM_PODX_GRACEFUL } ap_podx_restart_t; + +/** + * Open the extended pipe-of-death. + * @param p The pool to use for allocating the pipe + * @param pod The pipe-of-death that is created. + */ +AP_DECLARE(apr_status_t) ap_mpm_podx_open(apr_pool_t *p, ap_pod_t **pod); + +/** + * Check the extended pipe to determine if the process has been signalled to die. + */ +AP_DECLARE(int) ap_mpm_podx_check(ap_pod_t *pod); + +/** + * Close the pipe-of-death + * + * @param pod The pipe-of-death to close. + */ +AP_DECLARE(apr_status_t) ap_mpm_podx_close(ap_pod_t *pod); + +/** + * Write data to the extended pipe-of-death, signalling that one child process + * should die. + * @param pod the pipe-of-death to write to. + * @param graceful restart-type + */ +AP_DECLARE(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 all child process + * should die. + * @param pod The pipe-of-death to write to. + * @param num The number of child processes to kill + * @param graceful restart-type + */ +AP_DECLARE(void) ap_mpm_podx_killpg(ap_pod_t *pod, int num, + ap_podx_restart_t graceful); + + #endif /* !WIN32 || DOXYGEN */ /** |