prefork.c revision d2751d15d705ab5cb55f1f10d5c5f5e16c5bbb4f
28ec5e4f5c4a71428affc986304e894eda600925takashi/* ====================================================================
89565ae25f070411b0b32505b798195a9c98a1c2mturk * The Apache Software License, Version 1.1
5f5d1b4cc970b7f06ff8ef6526128e9a27303d88nd * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
89565ae25f070411b0b32505b798195a9c98a1c2mturk * reserved.
031b91a62d25106ae69d4693475c79618dd5e884fielding * Redistribution and use in source and binary forms, with or without
031b91a62d25106ae69d4693475c79618dd5e884fielding * modification, are permitted provided that the following conditions
031b91a62d25106ae69d4693475c79618dd5e884fielding * 1. Redistributions of source code must retain the above copyright
031b91a62d25106ae69d4693475c79618dd5e884fielding * notice, this list of conditions and the following disclaimer.
89565ae25f070411b0b32505b798195a9c98a1c2mturk * 2. Redistributions in binary form must reproduce the above copyright
89565ae25f070411b0b32505b798195a9c98a1c2mturk * notice, this list of conditions and the following disclaimer in
89565ae25f070411b0b32505b798195a9c98a1c2mturk * the documentation and/or other materials provided with the
89565ae25f070411b0b32505b798195a9c98a1c2mturk * distribution.
89565ae25f070411b0b32505b798195a9c98a1c2mturk * 3. The end-user documentation included with the redistribution,
89565ae25f070411b0b32505b798195a9c98a1c2mturk * if any, must include the following acknowledgment:
89565ae25f070411b0b32505b798195a9c98a1c2mturk * "This product includes software developed by the
89565ae25f070411b0b32505b798195a9c98a1c2mturk * Apache Software Foundation (http://www.apache.org/)."
89565ae25f070411b0b32505b798195a9c98a1c2mturk * Alternately, this acknowledgment may appear in the software itself,
89565ae25f070411b0b32505b798195a9c98a1c2mturk * if and wherever such third-party acknowledgments normally appear.
89565ae25f070411b0b32505b798195a9c98a1c2mturk * 4. The names "Apache" and "Apache Software Foundation" must
89565ae25f070411b0b32505b798195a9c98a1c2mturk * not be used to endorse or promote products derived from this
89565ae25f070411b0b32505b798195a9c98a1c2mturk * software without prior written permission. For written
edcb4d94a269c3b1c3fdd6473e3f91e6c20e1702takashi * permission, please contact apache@apache.org.
89565ae25f070411b0b32505b798195a9c98a1c2mturk * 5. Products derived from this software may not be called "Apache",
89565ae25f070411b0b32505b798195a9c98a1c2mturk * nor may "Apache" appear in their name, without prior written
89565ae25f070411b0b32505b798195a9c98a1c2mturk * permission of the Apache Software Foundation.
89565ae25f070411b0b32505b798195a9c98a1c2mturk * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
89565ae25f070411b0b32505b798195a9c98a1c2mturk * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
89565ae25f070411b0b32505b798195a9c98a1c2mturk * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
89565ae25f070411b0b32505b798195a9c98a1c2mturk * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
89565ae25f070411b0b32505b798195a9c98a1c2mturk * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
89565ae25f070411b0b32505b798195a9c98a1c2mturk * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
89565ae25f070411b0b32505b798195a9c98a1c2mturk * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
89565ae25f070411b0b32505b798195a9c98a1c2mturk * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
89565ae25f070411b0b32505b798195a9c98a1c2mturk * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
89565ae25f070411b0b32505b798195a9c98a1c2mturk * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
89565ae25f070411b0b32505b798195a9c98a1c2mturk * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
89565ae25f070411b0b32505b798195a9c98a1c2mturk * SUCH DAMAGE.
89565ae25f070411b0b32505b798195a9c98a1c2mturk * ====================================================================
89565ae25f070411b0b32505b798195a9c98a1c2mturk * This software consists of voluntary contributions made by many
ac08ae3142a205d1af6b8eb9b1810af58d904c00nd * individuals on behalf of the Apache Software Foundation. For more
b97955fc7710323d2352a6c6f514fec02649e12dcovener * information on the Apache Software Foundation, please see
eb8ce30512a5e12d6b74971d9add7176fbee8e23rbowen * Portions of this software are based upon public domain software
eb8ce30512a5e12d6b74971d9add7176fbee8e23rbowen * originally written at the National Center for Supercomputing Applications,
6b9c9dc5117b48184a610fcea6f88a4704f63e5end * University of Illinois, Urbana-Champaign.
2fae9d127f7143fabe8f73958eb9bde31df17d41coar * httpd.c: simple http daemon for answering WWW file requests
eb8ce30512a5e12d6b74971d9add7176fbee8e23rbowen * 03-21-93 Rob McCool wrote original code (up to NCSA HTTPd 1.3)
eb8ce30512a5e12d6b74971d9add7176fbee8e23rbowen * 03-06-95 blong
626cbbae0d87d1e58fabf969ef6c55e3f5fcd544humbedooh * changed server number for child-alone processes to 0 and changed name
626cbbae0d87d1e58fabf969ef6c55e3f5fcd544humbedooh * of processes
626cbbae0d87d1e58fabf969ef6c55e3f5fcd544humbedooh * 03-10-95 blong
626cbbae0d87d1e58fabf969ef6c55e3f5fcd544humbedooh * Added numerous speed hacks proposed by Robert S. Thau (rst@ai.mit.edu)
626cbbae0d87d1e58fabf969ef6c55e3f5fcd544humbedooh * including set group before fork, and call gettime before to fork
2fae9d127f7143fabe8f73958eb9bde31df17d41coar * to set up libraries.
eb8ce30512a5e12d6b74971d9add7176fbee8e23rbowen * 04-14-95 rst / rh
6b9c9dc5117b48184a610fcea6f88a4704f63e5end * Brandon's code snarfed from NCSA 1.4, but tinkered to work with the
6b9c9dc5117b48184a610fcea6f88a4704f63e5end * Apache server, and also to have child processes do accept() directly.
eb8ce30512a5e12d6b74971d9add7176fbee8e23rbowen * April-July '95 rst
eb8ce30512a5e12d6b74971d9add7176fbee8e23rbowen * Extensive rework for Apache.
5d01f40ffd657dd2ac567aacd93cabd162ddfa79coar/* TODO: this is a cobbled together prefork MPM example... it should mostly
6b9c9dc5117b48184a610fcea6f88a4704f63e5end * TODO: behave like apache-1.3... here's a short list of things I think
6b9c9dc5117b48184a610fcea6f88a4704f63e5end * TODO: need cleaning up still:
f7f7fdc0557bf57f1b50982c88d422d743aa2f12humbedooh#include <bstring.h> /* for IRIX, FD_SET calls bzero() */
89565ae25f070411b0b32505b798195a9c98a1c2mturk/* config globals */
89565ae25f070411b0b32505b798195a9c98a1c2mturkint ap_threads_per_child=0; /* Worker threads per child */
89565ae25f070411b0b32505b798195a9c98a1c2mturkstatic const char *ap_lock_fname;
89565ae25f070411b0b32505b798195a9c98a1c2mturk * The max child slot ever assigned, preserved across restarts. Necessary
89565ae25f070411b0b32505b798195a9c98a1c2mturk * to deal with MaxClients changes across SIGWINCH restarts. We use this
ab1ccbc6cd311935013f6e620b5103242147d688rjung * value to optimize routines that have to scan the entire scoreboard.
89565ae25f070411b0b32505b798195a9c98a1c2mturk/* *Non*-shared http_main globals... */
89565ae25f070411b0b32505b798195a9c98a1c2mturk/* one_process --- debugging mode variable; can be set from the command line
89565ae25f070411b0b32505b798195a9c98a1c2mturk * with the -X flag. If set, this gets you the child_main loop running
89565ae25f070411b0b32505b798195a9c98a1c2mturk * in the process which originally started up (no detach, no make_child),
89565ae25f070411b0b32505b798195a9c98a1c2mturk * which is a pretty nice debugging environment. (You'll get a SIGHUP
89565ae25f070411b0b32505b798195a9c98a1c2mturk * early in standalone_main; just continue through. This is the server
89565ae25f070411b0b32505b798195a9c98a1c2mturk * trying to kill off any child processes which it might have lying
89565ae25f070411b0b32505b798195a9c98a1c2mturk * around --- Apache doesn't keep track of their pids, it just sends
89565ae25f070411b0b32505b798195a9c98a1c2mturk * SIGHUP to the process group, ignoring it in the root process.
89565ae25f070411b0b32505b798195a9c98a1c2mturk * Continue through and you'll be fine.).
89565ae25f070411b0b32505b798195a9c98a1c2mturkstatic int one_process = 0;
89565ae25f070411b0b32505b798195a9c98a1c2mturkstatic apr_pool_t *pchild; /* Pool for httpd child stuff */
89565ae25f070411b0b32505b798195a9c98a1c2mturkstatic pid_t ap_my_pid; /* it seems silly to call getpid all the time */
89565ae25f070411b0b32505b798195a9c98a1c2mturk#endif /* TPF */
fa34cf7b4d4e5468f70c1c23af39984dfa1d7231nd * change directory for gprof to plop the gmon.out file
89565ae25f070411b0b32505b798195a9c98a1c2mturk * configure in httpd.conf:
89565ae25f070411b0b32505b798195a9c98a1c2mturk * GprofDir logs/ -> $ServerRoot/logs/gmon.out
fa34cf7b4d4e5468f70c1c23af39984dfa1d7231nd * GprofDir logs/% -> $ServerRoot/logs/gprof.$pid/gmon.out
89565ae25f070411b0b32505b798195a9c98a1c2mturkstatic void chdir_for_gprof(void)
89565ae25f070411b0b32505b798195a9c98a1c2mturk ap_get_module_config(ap_server_conf->module_config, &core_module);
89565ae25f070411b0b32505b798195a9c98a1c2mturk const char *use_dir;
89565ae25f070411b0b32505b798195a9c98a1c2mturk apr_snprintf(buf, sizeof(buf), "%sgprof.%d", dir, (int)getpid());
89565ae25f070411b0b32505b798195a9c98a1c2mturk use_dir = ap_server_root_relative(pconf, buf[0] ? buf : dir);
89565ae25f070411b0b32505b798195a9c98a1c2mturk if(res != APR_SUCCESS && !APR_STATUS_IS_EEXIST(res)) {
89565ae25f070411b0b32505b798195a9c98a1c2mturk ap_log_error(APLOG_MARK, APLOG_ERR, errno, ap_server_conf,
89565ae25f070411b0b32505b798195a9c98a1c2mturk/* XXX - I don't know if TPF will ever use this module or not, so leave
ac08ae3142a205d1af6b8eb9b1810af58d904c00nd * the ap_check_signals calls in but disable them - manoj */
89565ae25f070411b0b32505b798195a9c98a1c2mturk/* a clean exit from a child with proper cleanup */
89565ae25f070411b0b32505b798195a9c98a1c2mturkstatic void clean_child_exit(int code) __attribute__ ((noreturn));
89565ae25f070411b0b32505b798195a9c98a1c2mturk /* XXXX possibly bogus cast */
89565ae25f070411b0b32505b798195a9c98a1c2mturk ap_server_root_relative(p, ap_lock_fname), (unsigned long)getpid());
89565ae25f070411b0b32505b798195a9c98a1c2mturk/* Initialize mutex lock.
89565ae25f070411b0b32505b798195a9c98a1c2mturk * Done by each child at its birth
89565ae25f070411b0b32505b798195a9c98a1c2mturk rv = apr_lock_child_init(&accept_lock, ap_lock_fname, p);
89565ae25f070411b0b32505b798195a9c98a1c2mturk "couldn't do child init for accept mutex");
89565ae25f070411b0b32505b798195a9c98a1c2mturk/* Initialize mutex lock.
89565ae25f070411b0b32505b798195a9c98a1c2mturk * Must be safe to call this on a restart.
89565ae25f070411b0b32505b798195a9c98a1c2mturk rv = apr_lock_create(&accept_lock, APR_MUTEX, APR_CROSS_PROCESS, ap_lock_fname, p);
89565ae25f070411b0b32505b798195a9c98a1c2mturk ap_log_error(APLOG_MARK, APLOG_EMERG, rv, NULL, "couldn't create accept mutex");
89565ae25f070411b0b32505b798195a9c98a1c2mturkstatic void accept_mutex_on(void)
89565ae25f070411b0b32505b798195a9c98a1c2mturk ap_log_error(APLOG_MARK, APLOG_EMERG, rv, NULL, "couldn't grab the accept mutex");
89565ae25f070411b0b32505b798195a9c98a1c2mturkstatic void accept_mutex_off(void)
89565ae25f070411b0b32505b798195a9c98a1c2mturk ap_log_error(APLOG_MARK, APLOG_EMERG, rv, NULL, "couldn't release the accept mutex");
89565ae25f070411b0b32505b798195a9c98a1c2mturk/* On some architectures it's safe to do unserialized accept()s in the single
89565ae25f070411b0b32505b798195a9c98a1c2mturk * Listen case. But it's never safe to do it in the case where there's
89565ae25f070411b0b32505b798195a9c98a1c2mturk * multiple Listen statements. Define SINGLE_LISTEN_UNSERIALIZED_ACCEPT
89565ae25f070411b0b32505b798195a9c98a1c2mturk * when it's safe in the single Listen case.
89565ae25f070411b0b32505b798195a9c98a1c2mturk#define SAFE_ACCEPT(stmt) do {if (ap_listeners->next) {stmt;}} while(0)
89565ae25f070411b0b32505b798195a9c98a1c2mturkAP_DECLARE(apr_status_t) ap_mpm_query(int query_code, int *result)
89565ae25f070411b0b32505b798195a9c98a1c2mturk Systems without a real waitpid sometimes lose a child's exit while waiting
89565ae25f070411b0b32505b798195a9c98a1c2mturk for another. Search through the scoreboard for missing children.
89565ae25f070411b0b32505b798195a9c98a1c2mturk for (n = 0; n < ap_max_daemons_limit; ++n) {
89565ae25f070411b0b32505b798195a9c98a1c2mturk if (ap_scoreboard_image->servers[n][0].status != SERVER_DEAD &&
89565ae25f070411b0b32505b798195a9c98a1c2mturk kill((pid = ap_scoreboard_image->parent[n].pid), 0) == -1) {
89565ae25f070411b0b32505b798195a9c98a1c2mturk ap_update_child_status(AP_CHILD_THREAD_FROM_ID(n), SERVER_DEAD, NULL);
89565ae25f070411b0b32505b798195a9c98a1c2mturk /* just mark it as having a successful exit status */
89565ae25f070411b0b32505b798195a9c98a1c2mturk/* handle all varieties of core dumping signals */
89565ae25f070411b0b32505b798195a9c98a1c2mturk /* At this point we've got sig blocked, because we're still inside
89565ae25f070411b0b32505b798195a9c98a1c2mturk * the signal handler. When we leave the signal handler it will
89565ae25f070411b0b32505b798195a9c98a1c2mturk * be unblocked, and we'll take the signal... and coredump or whatever
ac08ae3142a205d1af6b8eb9b1810af58d904c00nd * is appropriate for this particular Unix. In addition the parent
89565ae25f070411b0b32505b798195a9c98a1c2mturk * will see the real signal we received -- whereas if we called
89565ae25f070411b0b32505b798195a9c98a1c2mturk * abort() here, the parent would only see SIGABRT.
89565ae25f070411b0b32505b798195a9c98a1c2mturk/*****************************************************************
89565ae25f070411b0b32505b798195a9c98a1c2mturk * Connection structures and accounting...
89565ae25f070411b0b32505b798195a9c98a1c2mturk /* clean_child_exit(0); */
89565ae25f070411b0b32505b798195a9c98a1c2mturk/* volatile just in case */
89565ae25f070411b0b32505b798195a9c98a1c2mturkstatic int volatile shutdown_pending;
89565ae25f070411b0b32505b798195a9c98a1c2mturkstatic int volatile restart_pending;
89565ae25f070411b0b32505b798195a9c98a1c2mturkstatic int volatile is_graceful;
860b4efe27e7c1c9a2bf5c872b29c90f76849b51jim /* Um, is this _probably_ not an error, if the user has
89565ae25f070411b0b32505b798195a9c98a1c2mturk * tried to do a shutdown twice quickly, so we won't
89565ae25f070411b0b32505b798195a9c98a1c2mturk * worry about reporting it.
89565ae25f070411b0b32505b798195a9c98a1c2mturk/* restart() is the signal handler for SIGHUP and SIGWINCH
89565ae25f070411b0b32505b798195a9c98a1c2mturk * in the parent process, unless running in ONE_PROCESS mode
89565ae25f070411b0b32505b798195a9c98a1c2mturk /* Probably not an error - don't bother reporting it */
89565ae25f070411b0b32505b798195a9c98a1c2mturk apr_pool_cleanup_kill(pconf, NULL, ap_cleanup_scoreboard);
89565ae25f070411b0b32505b798195a9c98a1c2mturkstatic void set_signals(void)
ac08ae3142a205d1af6b8eb9b1810af58d904c00nd ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "sigaction(SIGSEGV)");
89565ae25f070411b0b32505b798195a9c98a1c2mturk ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "sigaction(SIGBUS)");
859b48e3bdddba9e15726935cb45cb7ae890320fjailletc ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "sigaction(SIGABORT)");
89565ae25f070411b0b32505b798195a9c98a1c2mturk ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "sigaction(SIGABRT)");
89565ae25f070411b0b32505b798195a9c98a1c2mturk ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "sigaction(SIGILL)");
12eb0882b553ff0fe7637fccff3fd74da4f7ffd3rpluem ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "sigaction(SIGTERM)");
ac08ae3142a205d1af6b8eb9b1810af58d904c00nd ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "sigaction(SIGINT)");
89565ae25f070411b0b32505b798195a9c98a1c2mturk ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "sigaction(SIGXCPU)");
12eb0882b553ff0fe7637fccff3fd74da4f7ffd3rpluem ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "sigaction(SIGXFSZ)");
12eb0882b553ff0fe7637fccff3fd74da4f7ffd3rpluem ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "sigaction(SIGPIPE)");
89565ae25f070411b0b32505b798195a9c98a1c2mturk /* we want to ignore HUPs and WINCH while we're busy processing one */
89565ae25f070411b0b32505b798195a9c98a1c2mturk ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "sigaction(SIGHUP)");
89565ae25f070411b0b32505b798195a9c98a1c2mturk ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "sigaction(SIGWINCH)");
89565ae25f070411b0b32505b798195a9c98a1c2mturk#endif /* SIGBUS */
89565ae25f070411b0b32505b798195a9c98a1c2mturk#endif /* SIGABORT */
89565ae25f070411b0b32505b798195a9c98a1c2mturk#endif /* SIGABRT */
89565ae25f070411b0b32505b798195a9c98a1c2mturk#endif /* SIGILL */
89565ae25f070411b0b32505b798195a9c98a1c2mturk#endif /* SIGXCPU */
89565ae25f070411b0b32505b798195a9c98a1c2mturk#endif /* SIGXFSZ */
c32f47bb60db3b2ae0912e881597f7c7de6fdad9pctony#endif /* SIGHUP */
89565ae25f070411b0b32505b798195a9c98a1c2mturk#endif /* SIGWINCH */
89565ae25f070411b0b32505b798195a9c98a1c2mturk#endif /* SIGPIPE */
89565ae25f070411b0b32505b798195a9c98a1c2mturk/*****************************************************************
89565ae25f070411b0b32505b798195a9c98a1c2mturk * Child process main loop.
89565ae25f070411b0b32505b798195a9c98a1c2mturk * The following vars are static to avoid getting clobbered by longjmp();
89565ae25f070411b0b32505b798195a9c98a1c2mturk * they are really private to child_main.
89565ae25f070411b0b32505b798195a9c98a1c2mturkstatic int srv;
89565ae25f070411b0b32505b798195a9c98a1c2mturk /* not ever called anymore... */
89565ae25f070411b0b32505b798195a9c98a1c2mturk /* Get a sub context for global allocations in this child, so that
89565ae25f070411b0b32505b798195a9c98a1c2mturk * we can have cleanups occur when the child exits.
89565ae25f070411b0b32505b798195a9c98a1c2mturk /* needs to be done before we switch UIDs so we have permissions */
89565ae25f070411b0b32505b798195a9c98a1c2mturk (void) ap_update_child_status(AP_CHILD_THREAD_FROM_ID(my_child_num), SERVER_READY, (request_rec *) NULL);
89565ae25f070411b0b32505b798195a9c98a1c2mturk /* Prepare to receive a SIGWINCH due to graceful restart so that
89565ae25f070411b0b32505b798195a9c98a1c2mturk * we can exit cleanly.
89565ae25f070411b0b32505b798195a9c98a1c2mturk * (Re)initialize this child to a pre-connection state.
if ((ap_max_requests_per_child > 0
clean_child_exit(0);
(void) ap_update_child_status(AP_CHILD_THREAD_FROM_ID(my_child_num), SERVER_READY, (request_rec *) NULL);
if (srv <= 0)
if (!lr)
goto got_listener;
if (!lr)
if (die_now) {
clean_child_exit(0);
switch (stat) {
#ifdef EPROTO
case EPROTO:
#ifdef ECONNABORTED
case ECONNABORTED:
#ifdef ECONNRESET
case ECONNRESET:
#ifdef ETIMEDOUT
case ETIMEDOUT:
#ifdef EHOSTUNREACH
case EHOSTUNREACH:
#ifdef ENETUNREACH
case ENETUNREACH:
#ifdef ENETDOWN
case ENETDOWN:
#ifdef TPF
case EINACT:
if (die_now) {
clean_child_exit(0);
#ifdef TPF
if (current_conn) {
clean_child_exit(0);
int pid;
if (one_process) {
#ifdef SIGQUIT
(void) ap_update_child_status(AP_CHILD_THREAD_FROM_ID(slot), SERVER_STARTING, (request_rec *) NULL);
#ifdef _OSD_POSIX
if (!pid) {
#ifdef HAVE_BINDPROCESSOR
#ifdef SCOREBOARD_FILE
sizeof(process_score));
#ifndef MAX_SPAWN_RATE
static int hold_off_on_exponential_spawning;
int to_kill;
int idle_count;
int free_length;
int last_non_dead;
int total_non_dead;
free_length = 0;
idle_count = 0;
total_non_dead = 0;
for (i = 0; i < ap_daemons_limit; ++i) {
int status;
++free_length;
++ idle_count;
to_kill = i;
last_non_dead = i;
if (free_length == 0) {
static int reported = 0;
if (!reported) {
"to increase StartServers, or Min/MaxSpareServers), "
for (i = 0; i < free_length; ++i) {
#ifdef TPF
int sockdes;
int index;
ap_server_conf = s;
if (setup_listeners(s)) {
if (!is_graceful) {
#ifdef SCOREBOARD_FILE
set_signals();
if (!is_graceful) {
int child_slot;
if (child_slot >= 0) {
else if (is_graceful) {
0, ap_server_conf,
else if (remaining_children_to_start) {
#ifdef TPF
if (shutdown_pending) {
0, ap_server_conf,
if (one_process) {
if (is_graceful) {
#ifndef SCOREBOARD_FILE
static int restart_num = 0;
int no_detach = 0;
is_graceful = 0;
ap_extended_status = 0;
#ifdef AUX3
(void) set42sig();
return err;
return NULL;
return err;
return NULL;
return err;
return NULL;
return err;
return NULL;
return err;
if (ap_daemons_min_free <= 0) {
return NULL;
return err;
return NULL;
return err;
return NULL;
return err;
return NULL;
const char *fname;
return err;
return NULL;
{ NULL }