mpm_common.c revision cccd31fa4a72fe23cc3249c06db181b274a55a69
252N/A/* ==================================================================== 252N/A * The Apache Software License, Version 1.1 252N/A * Copyright (c) 2000 The Apache Software Foundation. All rights 252N/A * Redistribution and use in source and binary forms, with or without 252N/A * modification, are permitted provided that the following conditions 252N/A * 1. Redistributions of source code must retain the above copyright 252N/A * notice, this list of conditions and the following disclaimer. 252N/A * 2. Redistributions in binary form must reproduce the above copyright 252N/A * notice, this list of conditions and the following disclaimer in 252N/A * the documentation and/or other materials provided with the 252N/A * 3. The end-user documentation included with the redistribution, 252N/A * if any, must include the following acknowledgment: 252N/A * "This product includes software developed by the 252N/A * Alternately, this acknowledgment may appear in the software itself, 252N/A * if and wherever such third-party acknowledgments normally appear. 252N/A * 4. The names "Apache" and "Apache Software Foundation" must 252N/A * not be used to endorse or promote products derived from this 252N/A * software without prior written permission. For written 252N/A * permission, please contact apache@apache.org. 252N/A * 5. Products derived from this software may not be called "Apache", 252N/A * nor may "Apache" appear in their name, without prior written 252N/A * permission of the Apache Software Foundation. 252N/A * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 252N/A * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 252N/A * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 252N/A * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR 252N/A * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 252N/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 252N/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 252N/A * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 252N/A * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 252N/A * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 252N/A * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 252N/A * ==================================================================== 252N/A * This software consists of voluntary contributions made by many 252N/A * individuals on behalf of the Apache Software Foundation. For more 252N/A * information on the Apache Software Foundation, please see 252N/A * Portions of this software are based upon public domain software 252N/A * originally written at the National Center for Supercomputing Applications, 252N/A * University of Illinois, Urbana-Champaign. 252N/A/* The purpose of this file is to store the code that MOST mpm's will need 252N/A * this does not mean a function only goes into this file if every MPM needs 252N/A * it. It means that if a function is needed by more than one MPM, and 252N/A * future maintenance would be served by making the code common, then the 252N/A * function belongs here. 252N/A * This is going in src/main because it is not platform specific, it is 252N/A * specific to multi-process servers, but NOT to Unix. Which is why it /* don't want to hold up progress any more than * necessary, but we need to allow children a few moments to exit. * Set delay with an exponential backoff. /* now see who is done */ /* ok, now it's being annoying */ "child process %ld still did not exit, sending a SIGTERM",
"child process %ld still did not exit, sending a SIGKILL",
/* sending a SIGKILL kills the entire team on BeOS, and as * httpd thread is part of that team it removes any chance * of ever doing a restart. To counter this I'm changing to * use a kinder, gentler way of killing a specific thread * that is just as effective. /* gave it our best shot, but alas... If this really * is a child we are trying to kill and it really hasn't * exited, we will likely fail to bind to the port "could not make child process %ld exit, " "attempting to continue anyway", (
long)
pid);
/* nothing left to wait for */ #
endif /* NEED_RECLAIM_CHILD_PROCESSES *//* number of calls to wait_or_timeout between writable probes */ /* Child died... if it died due to a fatal error, * we should simply bail out. "child pid %ld exit signal %s (%d), " "possible coredump in %s",
"child pid %ld exit signal %s (%d)",
"child pid %ld exit signal %d",
/* The Nagle algorithm says that we should delay sending partial * packets in hopes of getting more data. We don't want to do * this; we are not telnet. There are bad interactions between * persistent connections and Nagle's algorithm that have very severe * performance penalties. (Failing to disable Nagle is not much of a * problem with simple HTTP.) * In spite of these problems, failure here is not a shooting offense. "setsockopt: (TCP_NODELAY)");