summaryrefslogtreecommitdiff
path: root/include/mpm_common.h
diff options
context:
space:
mode:
authorRyan Bloom <rbb@apache.org>2001-06-07 00:09:16 +0000
committerRyan Bloom <rbb@apache.org>2001-06-07 00:09:16 +0000
commit931fe85b8df29fdbd47c6d3f6b4f724d8c6b8645 (patch)
tree55a283a367792e78a0bbc97e577545675b5d4c76 /include/mpm_common.h
parent06ca840aa4e1037d1d282603196461b2b2107120 (diff)
downloadhttpd-931fe85b8df29fdbd47c6d3f6b4f724d8c6b8645.tar.gz
First pass at the pipe_of_death logic for the prefork MPM. This does
pass some initial testing, but it needs to be banged on more. It looks like if the server gets a lot of requests to restart all at once, there are potential problems, but other than that this does seem to solve our current restart issues. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89282 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/mpm_common.h')
-rw-r--r--include/mpm_common.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/include/mpm_common.h b/include/mpm_common.h
index 1873dd9778..f029225320 100644
--- a/include/mpm_common.h
+++ b/include/mpm_common.h
@@ -164,6 +164,49 @@ AP_DECLARE(gid_t) ap_gname2id(const char *name);
#define AP_MPM_HARD_LIMITS_FILE APACHE_MPM_DIR "/mpm_default.h"
+#ifdef AP_MPM_USES_POD
+
+typedef struct ap_pod_t ap_pod_t;
+
+struct ap_pod_t {
+ apr_file_t *pod_in;
+ apr_file_t *pod_out;
+ apr_pool_t *p;
+};
+
+/**
+ * Open the pipe-of-death. The pipe of death is used to tell all child
+ * processes that it is time to die gracefully.
+ * @param p The pool to use for allocating the pipe
+ */
+AP_DECLARE(apr_status_t) ap_mpm_pod_open(apr_pool_t *p, ap_pod_t **pod);
+
+/**
+ * Check the pipe to determine if the process has been signalled to die.
+ */
+AP_DECLARE(apr_status_t) ap_mpm_pod_check(ap_pod_t *pod);
+
+/**
+ * Close the pipe-of-death
+ */
+AP_DECLARE(apr_status_t) ap_mpm_pod_close(ap_pod_t *pod);
+
+/**
+ * Write data to the pipe-of-death, signalling that one child process
+ * should die.
+ * @param p The pool to use when allocating any required structures.
+ */
+AP_DECLARE(apr_status_t) ap_mpm_pod_signal(ap_pod_t *pod);
+
+/**
+ * Write data to the pipe-of-death, signalling that all child process
+ * should die.
+ * @param p The pool to use when allocating any required structures.
+ * @param num The number of child processes to kill
+ */
+AP_DECLARE(void) ap_mpm_pod_killpg(ap_pod_t *pod, int num);
+#endif
+
#ifdef __cplusplus
}
#endif