scoreboard.c revision ec020ca384efb30d501a5af796ddc3bb237d7b8f
beaad6ac31022179c44d88536811e9ccd9425696nd/* ====================================================================
beaad6ac31022179c44d88536811e9ccd9425696nd * The Apache Software License, Version 1.1
db878466c5e95073429dda0bdd001f45e9486e16fielding * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
db878466c5e95073429dda0bdd001f45e9486e16fielding * reserved.
db878466c5e95073429dda0bdd001f45e9486e16fielding * Redistribution and use in source and binary forms, with or without
db878466c5e95073429dda0bdd001f45e9486e16fielding * modification, are permitted provided that the following conditions
beaad6ac31022179c44d88536811e9ccd9425696nd * 1. Redistributions of source code must retain the above copyright
beaad6ac31022179c44d88536811e9ccd9425696nd * notice, this list of conditions and the following disclaimer.
beaad6ac31022179c44d88536811e9ccd9425696nd * 2. Redistributions in binary form must reproduce the above copyright
beaad6ac31022179c44d88536811e9ccd9425696nd * notice, this list of conditions and the following disclaimer in
beaad6ac31022179c44d88536811e9ccd9425696nd * the documentation and/or other materials provided with the
beaad6ac31022179c44d88536811e9ccd9425696nd * distribution.
beaad6ac31022179c44d88536811e9ccd9425696nd * 3. The end-user documentation included with the redistribution,
01c674544bd4c211141bcd9fb09b96ffc18c6c3dnd * if any, must include the following acknowledgment:
7e68fce3cbd2246164e045a51ecd77f9f26680ednd * "This product includes software developed by the
01c674544bd4c211141bcd9fb09b96ffc18c6c3dnd * Apache Software Foundation (http://www.apache.org/)."
3726777f47ac4bba3e21b075905959bbea47e72eerikabele * Alternately, this acknowledgment may appear in the software itself,
3726777f47ac4bba3e21b075905959bbea47e72eerikabele * if and wherever such third-party acknowledgments normally appear.
3726777f47ac4bba3e21b075905959bbea47e72eerikabele * 4. The names "Apache" and "Apache Software Foundation" must
7e68fce3cbd2246164e045a51ecd77f9f26680ednd * not be used to endorse or promote products derived from this
7e68fce3cbd2246164e045a51ecd77f9f26680ednd * software without prior written permission. For written
7e68fce3cbd2246164e045a51ecd77f9f26680ednd * permission, please contact apache@apache.org.
7e68fce3cbd2246164e045a51ecd77f9f26680ednd * 5. Products derived from this software may not be called "Apache",
66e48875fca2df6669dab4f2690ee36c6913c0ffnd * nor may "Apache" appear in their name, without prior written
7e68fce3cbd2246164e045a51ecd77f9f26680ednd * permission of the Apache Software Foundation.
7e68fce3cbd2246164e045a51ecd77f9f26680ednd * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
7fb6e8d950b9504e494df7055a315e2d2202ad36nd * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
7fb6e8d950b9504e494df7055a315e2d2202ad36nd * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
7fb6e8d950b9504e494df7055a315e2d2202ad36nd * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
7fb6e8d950b9504e494df7055a315e2d2202ad36nd * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
7fb6e8d950b9504e494df7055a315e2d2202ad36nd * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
3726777f47ac4bba3e21b075905959bbea47e72eerikabele * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
3726777f47ac4bba3e21b075905959bbea47e72eerikabele * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
3726777f47ac4bba3e21b075905959bbea47e72eerikabele * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
f1110149b5b6c28ecc39d1958d98ad9cfa8e41f3nd * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
f1110149b5b6c28ecc39d1958d98ad9cfa8e41f3nd * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
7e68fce3cbd2246164e045a51ecd77f9f26680ednd * SUCH DAMAGE.
7e68fce3cbd2246164e045a51ecd77f9f26680ednd * ====================================================================
8cfbcde8e416fd60132dd4324c42a5098da156cfnd * This software consists of voluntary contributions made by many
3726777f47ac4bba3e21b075905959bbea47e72eerikabele * individuals on behalf of the Apache Software Foundation. For more
8cfbcde8e416fd60132dd4324c42a5098da156cfnd * information on the Apache Software Foundation, please see
7e68fce3cbd2246164e045a51ecd77f9f26680ednd * Portions of this software are based upon public domain software
3726777f47ac4bba3e21b075905959bbea47e72eerikabele * originally written at the National Center for Supercomputing Applications,
7e68fce3cbd2246164e045a51ecd77f9f26680ednd * University of Illinois, Urbana-Champaign.
1be4d8468446c354f9a3abbdf51c67e25a05d93bhumbedoohAP_DECLARE_DATA scoreboard *ap_scoreboard_image = NULL;
1be4d8468446c354f9a3abbdf51c67e25a05d93bhumbedoohAP_DECLARE_DATA const char *ap_scoreboard_fname=NULL;
7e68fce3cbd2246164e045a51ecd77f9f26680ednd * This function should be renamed to cleanup_shared
7e68fce3cbd2246164e045a51ecd77f9f26680ednd * and it should handle cleaning up a scoreboard shared
3726777f47ac4bba3e21b075905959bbea47e72eerikabele * between processes using any form of IPC (file, shared memory
3726777f47ac4bba3e21b075905959bbea47e72eerikabele * segment, etc.). Leave it as is now because it is being used
return APR_SUCCESS;
const char *fname;
return APR_SUCCESS;
return APR_SUCCESS;
int running_gen = 0;
if (ap_scoreboard_image)
setup_shared(p);
void ap_sync_scoreboard_image(void)
#ifdef SCOREBOARD_FILE
void update_scoreboard_global(void)
#ifdef SCOREBOARD_FILE
#ifdef HAVE_TIMES
int max_daemons_limit;
for (i = 0; i < max_daemons_limit; ++i)
int old_status;
if (child_num < 0)
if (ap_extended_status) {
return old_status;
if (child_num < 0)
if (((x < 0) || (HARD_SERVER_LIMIT < x)) ||
((y < 0) || (HARD_THREAD_LIMIT < y))) {
if ((x < 0) || (HARD_SERVER_LIMIT < x)) {