scoreboard.c revision 48ad184bd4e1dcb23fd13b582135a76530ff08c6
2N/A/* ==================================================================== 2N/A * The Apache Software License, Version 1.1 2N/A * Copyright (c) 2000 The Apache Software Foundation. All rights 2N/A * Redistribution and use in source and binary forms, with or without 2N/A * modification, are permitted provided that the following conditions 2N/A * 1. Redistributions of source code must retain the above copyright 2N/A * notice, this list of conditions and the following disclaimer. 2N/A * 2. Redistributions in binary form must reproduce the above copyright 2N/A * notice, this list of conditions and the following disclaimer in 2N/A * the documentation and/or other materials provided with the 2N/A * 3. The end-user documentation included with the redistribution, 2N/A * if any, must include the following acknowledgment: 2790N/A * "This product includes software developed by the 5337N/A * Alternately, this acknowledgment may appear in the software itself, 2N/A * if and wherever such third-party acknowledgments normally appear. 2N/A * 4. The names "Apache" and "Apache Software Foundation" must 2N/A * not be used to endorse or promote products derived from this 2N/A * software without prior written permission. For written 2N/A * permission, please contact apache@apache.org. 2N/A * 5. Products derived from this software may not be called "Apache", 2N/A * nor may "Apache" appear in their name, without prior written 2N/A * permission of the Apache Software Foundation. 59N/A * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 2N/A * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 2N/A * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 2N/A * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR 2N/A * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26N/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26N/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 181N/A * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 26N/A * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 4811N/A * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 4811N/A * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3739N/A * ==================================================================== 3739N/A * This software consists of voluntary contributions made by many 3739N/A * individuals on behalf of the Apache Software Foundation. For more 3739N/A * information on the Apache Software Foundation, please see 3739N/A * Portions of this software are based upon public domain software 3817N/A * originally written at the National Center for Supercomputing Applications, 3817N/A * University of Illinois, Urbana-Champaign. 6607N/A/***************************************************************** 26N/A * Dealing with the scoreboard... a lot of these variables are global 26N/A * only to avoid getting clobbered by the longjmp() that happens when 3998N/A * a hard timeout expires... 2830N/A * We begin with routines which deal with the file itself... 5425N/A * Above code is shmem code. Below code is interacting with the shmem 59N/A/* Useful to erase the status of children that might be from previous 1256N/A/* Don't mess with the string you get back from this function */ 1256N/A /* We assume that there is a connection iff it has an entry in the status 1256N/A * table. Connections without any status sound problematic to me, so this 3109N/A * is probably for the best. - manoj */ 64N/A/* Note: no effort is made here to prevent multiple threads from messing with 64N/A * a single connection at the same time. ap_update_connection_status should 26N/A * only be called by the thread that owns the connection */ 2236N/A /* Not found. Add an entry for this value */ 2818N/A /* No room. Oh well, not much anyone can do about it. */ 1256N/A /* Go ahead and return what's in the connection status table even if we 1256N/A * aren't maintaining it. We can at least look at what children from 2818N/A * previous generations are up to. */