mpm_common.c revision faf8593cc6d1c8e598ca434f7e88effa74f19e2f
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny/* ====================================================================
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny * The Apache Software License, Version 1.1
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny * Copyright (c) 2000-2002 The Apache Software Foundation. All rights
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny * Redistribution and use in source and binary forms, with or without
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny * modification, are permitted provided that the following conditions
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny * 1. Redistributions of source code must retain the above copyright
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny * notice, this list of conditions and the following disclaimer.
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny * 2. Redistributions in binary form must reproduce the above copyright
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny * notice, this list of conditions and the following disclaimer in
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny * the documentation and/or other materials provided with the
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny * distribution.
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny * 3. The end-user documentation included with the redistribution,
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny * if any, must include the following acknowledgment:
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny * "This product includes software developed by the
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny * Apache Software Foundation (http://www.apache.org/)."
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny * Alternately, this acknowledgment may appear in the software itself,
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny * if and wherever such third-party acknowledgments normally appear.
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek * 4. The names "Apache" and "Apache Software Foundation" must
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek * not be used to endorse or promote products derived from this
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek * software without prior written permission. For written
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny * permission, please contact apache@apache.org.
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny * 5. Products derived from this software may not be called "Apache",
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny * nor may "Apache" appear in their name, without prior written
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny * permission of the Apache Software Foundation.
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny * SUCH DAMAGE.
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek * ====================================================================
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny * This software consists of voluntary contributions made by many
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek * individuals on behalf of the Apache Software Foundation. For more
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek * information on the Apache Software Foundation, please see
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny * Portions of this software are based upon public domain software
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek * originally written at the National Center for Supercomputing Applications,
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek * University of Illinois, Urbana-Champaign.
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny/* The purpose of this file is to store the code that MOST mpm's will need
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek * this does not mean a function only goes into this file if every MPM needs
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek * it. It means that if a function is needed by more than one MPM, and
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny * future maintenance would be served by making the code common, then the
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny * function belongs here.
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek * This is going in src/main because it is not platform specific, it is
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny * specific to multi-process servers, but NOT to Unix. Which is why it
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny * does not belong in src/os/unix
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny ap_mpm_query(AP_MPMQ_MAX_DAEMON_USED, &max_daemons);
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov for (tries = terminate ? 4 : 1; tries <= 9; ++tries) {
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny /* don't want to hold up progress any more than
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny * necessary, but we need to allow children a few moments to exit.
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny * Set delay with an exponential backoff.
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek /* now see who is done */
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek for (i = 0; i < max_daemons; ++i) {
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek waitret = apr_proc_wait(&proc, NULL, NULL, APR_NOWAIT);
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek /* ok, now it's being annoying */
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING,
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek "child process %ld still did not exit, "
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek "sending a SIGTERM",
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek /* die child scum */
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR,
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov "child process %ld still did not exit, "
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek "sending a SIGKILL",
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek /* sending a SIGKILL kills the entire team on BeOS, and as
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek * httpd thread is part of that team it removes any chance
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek * of ever doing a restart. To counter this I'm changing to
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov * use a kinder, gentler way of killing a specific thread
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek * that is just as effective.
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek /* gave it our best shot, but alas... If this really
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek * is a child we are trying to kill and it really hasn't
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek * exited, we will likely fail to bind to the port
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek * after the restart.
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR,
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek "could not make child process %ld exit, "
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek "attempting to continue anyway",
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek /* nothing left to wait for */
b6d5f2a91fbce15c7ef4d382fa6b52407adb26ddPavel Březina#endif /* AP_MPM_WANT_RECLAIM_CHILD_PROCESSES */
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek/* number of calls to wait_or_timeout between writable probes */
99bac83188601c2b07e0b141aac7dc7d882b464aSumit Bosevoid ap_wait_or_timeout(apr_exit_why_e *status, int *exitcode, apr_proc_t *ret,
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek if (wait_or_timeout_counter == INTERVAL_OF_WRITABLE_PROBES) {
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek rv = apr_proc_wait_all_procs(ret, exitcode, status, APR_NOWAIT, p);
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny if ((ret = reap_children(exitcode, status)) > 0) {
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov#endif /* AP_MPM_WANT_WAIT_OR_TIMEOUT */
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zelenyint ap_process_child_status(apr_proc_t *pid, apr_exit_why_e why, int status)
877b92e80bde510d5cd9f03dbf01e2bcf73ab072Michal Židek const char *sigdesc = apr_signal_get_description(signum);
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek /* Child died... if it died due to a fatal error,
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek * we should simply bail out. The caller needs to
877b92e80bde510d5cd9f03dbf01e2bcf73ab072Michal Židek * check for bad rc from us and exit, running any
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek * appropriate cleanups.
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek * If the child died due to a resource shortage,
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek * the parent should limit the rate of forking
8ba8222afca3026fd67af08e224b1d9e848aceaaJakub Hrozek ap_log_error(APLOG_MARK, APLOG_ALERT|APLOG_NOERRNO,
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny "Apache is exiting!",
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE,
aac3ca699a09090072ae4d68bdda8dec990ae393Sumit Bose "child pid %ld exit signal %s (%d), "
aac3ca699a09090072ae4d68bdda8dec990ae393Sumit Bose "possible coredump in %s",
bba1a5fd62cffcae076d1351df5a83fbc4a6ec17Simo Sorce ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE,
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov "child pid %ld exit signal %s (%d)",
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny#endif /* AP_MPM_WANT_PROCESS_CHILD_STATUS */
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny#if defined(TCP_NODELAY) && !defined(MPE) && !defined(TPF) && !defined(WIN32)
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny /* The Nagle algorithm says that we should delay sending partial
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny * packets in hopes of getting more data. We don't want to do
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny * this; we are not telnet. There are bad interactions between
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov * persistent connections and Nagle's algorithm that have very severe
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov * performance penalties. (Failing to disable Nagle is not much of a
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny * problem with simple HTTP.)
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny * In spite of these problems, failure here is not a shooting offense.
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny apr_status_t status = apr_setsocketopt(s, APR_TCP_NODELAY, 1);
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny ap_log_error(APLOG_MARK, APLOG_WARNING, status, ap_server_conf,
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny "setsockopt: (TCP_NODELAY)");
99bac83188601c2b07e0b141aac7dc7d882b464aSumit Bose ap_log_error(APLOG_MARK, APLOG_STARTUP|APLOG_NOERRNO, 0, NULL,
4f118e3e6a25762f40a43e6dbefb09f44adbef32Simo Sorce ap_log_error(APLOG_MARK, APLOG_STARTUP|APLOG_NOERRNO, 0, NULL,
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny#if defined(QNX) || defined(MPE) || defined(BEOS) || defined(_OSD_POSIX) || defined(TPF) || defined(__TANDEM) || defined(OS2) || defined(WIN32) || defined(NETWARE)
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny/* QNX, MPE and BeOS do not appear to support supplementary groups. */
c0f9698cd951b7223f251ff2511c4b22a6e4ba60Jan Zeleny#else /* ndef QNX */
909a86af4eb99f5d311d7136cab78dca535ae304Sumit Bose while (index < NGROUPS_MAX && ((g = getgrent()) != NULL)) {
909a86af4eb99f5d311d7136cab78dca535ae304Sumit Bose for (names = g->gr_mem; *names != NULL; ++names) {
0528fdec17d0031996e919fcd852459e86592c35Jakub Hrozek#endif /* def QNX */
0528fdec17d0031996e919fcd852459e86592c35Jakub Hrozek#endif /* def NEED_INITGROUPS */
909a86af4eb99f5d311d7136cab78dca535ae304Sumit BoseAP_DECLARE(apr_status_t) ap_mpm_pod_open(apr_pool_t *p, ap_pod_t **pod)
909a86af4eb99f5d311d7136cab78dca535ae304Sumit Bose rv = apr_file_pipe_create(&((*pod)->pod_in), &((*pod)->pod_out), p);
909a86af4eb99f5d311d7136cab78dca535ae304Sumit Bose apr_sockaddr_info_get(&(*pod)->sa, ap_listeners->bind_addr->hostname,
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov APR_UNSPEC, ap_listeners->bind_addr->port, 0, p);
0528fdec17d0031996e919fcd852459e86592c35Jakub HrozekAP_DECLARE(apr_status_t) ap_mpm_pod_check(ap_pod_t *pod)
909a86af4eb99f5d311d7136cab78dca535ae304Sumit BoseAP_DECLARE(apr_status_t) ap_mpm_pod_close(ap_pod_t *pod)
7caf7ed4f2eae1ec1c0717b4ee6ce78bdacd5926Jakub Hrozekstatic apr_status_t pod_signal_internal(ap_pod_t *pod)
7caf7ed4f2eae1ec1c0717b4ee6ce78bdacd5926Jakub Hrozek rv = apr_file_write(pod->pod_out, &char_of_death, &one);
7caf7ed4f2eae1ec1c0717b4ee6ce78bdacd5926Jakub Hrozek ap_log_error(APLOG_MARK, APLOG_WARNING, rv, ap_server_conf,
7caf7ed4f2eae1ec1c0717b4ee6ce78bdacd5926Jakub Hrozek "write pipe_of_death");
7caf7ed4f2eae1ec1c0717b4ee6ce78bdacd5926Jakub Hrozek/* This function connects to the server, then immediately closes the connection.
7caf7ed4f2eae1ec1c0717b4ee6ce78bdacd5926Jakub Hrozek * This permits the MPM to skip the poll when there is only one listening
7caf7ed4f2eae1ec1c0717b4ee6ce78bdacd5926Jakub Hrozek * socket, because it provides a alternate way to unblock an accept() when
7caf7ed4f2eae1ec1c0717b4ee6ce78bdacd5926Jakub Hrozek * the pod is used.
7caf7ed4f2eae1ec1c0717b4ee6ce78bdacd5926Jakub Hrozekstatic apr_status_t dummy_connection(ap_pod_t *pod)
7caf7ed4f2eae1ec1c0717b4ee6ce78bdacd5926Jakub Hrozek /* create a temporary pool for the socket. pconf stays around too long */
7caf7ed4f2eae1ec1c0717b4ee6ce78bdacd5926Jakub Hrozek rv = apr_socket_create(&sock, pod->sa->family, SOCK_STREAM, p);
7caf7ed4f2eae1ec1c0717b4ee6ce78bdacd5926Jakub Hrozek ap_log_error(APLOG_MARK, APLOG_WARNING, rv, ap_server_conf,
7caf7ed4f2eae1ec1c0717b4ee6ce78bdacd5926Jakub Hrozek "get socket to connect to listener");
7caf7ed4f2eae1ec1c0717b4ee6ce78bdacd5926Jakub Hrozek /* on some platforms (e.g., FreeBSD), the kernel won't accept many
7caf7ed4f2eae1ec1c0717b4ee6ce78bdacd5926Jakub Hrozek * queued connections before it starts blocking local connects...
7caf7ed4f2eae1ec1c0717b4ee6ce78bdacd5926Jakub Hrozek * we need to keep from blocking too long and instead return an error,
7caf7ed4f2eae1ec1c0717b4ee6ce78bdacd5926Jakub Hrozek * because the MPM won't want to hold up a graceful restart for a
7caf7ed4f2eae1ec1c0717b4ee6ce78bdacd5926Jakub Hrozek rv = apr_setsocketopt(sock, APR_SO_TIMEOUT, 3 * APR_USEC_PER_SEC);
7caf7ed4f2eae1ec1c0717b4ee6ce78bdacd5926Jakub Hrozek ap_log_error(APLOG_MARK, APLOG_WARNING, rv, ap_server_conf,
7caf7ed4f2eae1ec1c0717b4ee6ce78bdacd5926Jakub Hrozek "set timeout on socket to connect to listener");
7caf7ed4f2eae1ec1c0717b4ee6ce78bdacd5926Jakub Hrozek /* probably some server processes bailed out already and there
7caf7ed4f2eae1ec1c0717b4ee6ce78bdacd5926Jakub Hrozek * is nobody around to call accept and clear out the kernel
7caf7ed4f2eae1ec1c0717b4ee6ce78bdacd5926Jakub Hrozek * connection queue; usually this is not worth logging
7caf7ed4f2eae1ec1c0717b4ee6ce78bdacd5926Jakub Hrozek ap_log_error(APLOG_MARK, log_level, rv, ap_server_conf,
7caf7ed4f2eae1ec1c0717b4ee6ce78bdacd5926Jakub Hrozek "connect to listener");
7caf7ed4f2eae1ec1c0717b4ee6ce78bdacd5926Jakub HrozekAP_DECLARE(apr_status_t) ap_mpm_pod_signal(ap_pod_t *pod)
28ebfa4373d1e7ce45b5d70a3619df1c074a661ePavel Březina /* we don't write anything to the pod here... we assume
28ebfa4373d1e7ce45b5d70a3619df1c074a661ePavel Březina * that the would-be reader of the pod has another way to
7caf7ed4f2eae1ec1c0717b4ee6ce78bdacd5926Jakub Hrozek * see that it is time to die once we wake it up
28ebfa4373d1e7ce45b5d70a3619df1c074a661ePavel Březina * writing lots of things to the pod at once is very
28ebfa4373d1e7ce45b5d70a3619df1c074a661ePavel Březina * problematic... we can fill the kernel pipe buffer and
28ebfa4373d1e7ce45b5d70a3619df1c074a661ePavel Březina * be blocked until somebody consumes some bytes or
28ebfa4373d1e7ce45b5d70a3619df1c074a661ePavel Březina * we hit a timeout... if we hit a timeout we can't just
28ebfa4373d1e7ce45b5d70a3619df1c074a661ePavel Březina * keep trying because maybe we'll never successfully
7caf7ed4f2eae1ec1c0717b4ee6ce78bdacd5926Jakub Hrozek * write again... but then maybe we'll leave would-be
7caf7ed4f2eae1ec1c0717b4ee6ce78bdacd5926Jakub Hrozek * readers stranded (a number of them could be tied up for
7caf7ed4f2eae1ec1c0717b4ee6ce78bdacd5926Jakub Hrozek * a while serving time-consuming requests)
7caf7ed4f2eae1ec1c0717b4ee6ce78bdacd5926Jakub Hrozek for (i = 0; i < num && rv == APR_SUCCESS; i++) {
7caf7ed4f2eae1ec1c0717b4ee6ce78bdacd5926Jakub Hrozek#endif /* #ifdef AP_MPM_USES_POD */
7caf7ed4f2eae1ec1c0717b4ee6ce78bdacd5926Jakub Hrozek/* standard mpm configuration handling */
28ebfa4373d1e7ce45b5d70a3619df1c074a661ePavel Březinaconst char *ap_mpm_set_pidfile(cmd_parms *cmd, void *dummy,
28ebfa4373d1e7ce45b5d70a3619df1c074a661ePavel Březina const char *arg)
7caf7ed4f2eae1ec1c0717b4ee6ce78bdacd5926Jakub Hrozek const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
7caf7ed4f2eae1ec1c0717b4ee6ce78bdacd5926Jakub Hrozek return "PidFile directive not allowed in <VirtualHost>";
return NULL;
#ifdef AP_MPM_WANT_SET_SCOREBOARD
const char *arg)
return err;
return NULL;
#ifdef AP_MPM_WANT_SET_LOCKFILE
const char *arg)
return err;
return NULL;
#ifdef AP_MPM_WANT_SET_MAX_REQUESTS
int ap_max_requests_per_child = 0;
const char *arg)
return err;
return NULL;
#ifdef AP_MPM_WANT_SET_COREDUMPDIR
const char *arg)
const char *fname;
return err;
if (!fname) {
return NULL;
const char ap_valid_accept_mutex_string[] =
void *dummy,
const char *arg)
return err;
return NULL;