From e9eef7a853855546d56cc8759f44f0696a83f7ba Mon Sep 17 00:00:00 2001 From: Graham Leggett Date: Sat, 16 Nov 2013 19:24:53 +0000 Subject: 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 --- include/mpm_common.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'include/mpm_common.h') 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 */ /** -- cgit v1.2.1