SOURCES: httpd-2.0.52-peruser-0.1.6.patch (REMOVED), httpd-peruser...

adamg adamg at pld-linux.org
Mon Apr 21 07:40:21 CEST 2008


Author: adamg                        Date: Mon Apr 21 05:40:21 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- peruser patch updated to 2.2.3-0.3.0

---- Files affected:
SOURCES:
   httpd-2.0.52-peruser-0.1.6.patch (1.4 -> NONE)  (REMOVED), httpd-peruser.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/httpd-peruser.patch
diff -u /dev/null SOURCES/httpd-peruser.patch:1.1
--- /dev/null	Mon Apr 21 07:40:21 2008
+++ SOURCES/httpd-peruser.patch	Mon Apr 21 07:40:16 2008
@@ -0,0 +1,3498 @@
+diff -Nur httpd-2.2.3/server/mpm/config.m4 httpd-2.2.3-peruser/server/mpm/config.m4
+--- httpd-2.2.3/server/mpm/config.m4	2005-10-30 10:05:26.000000000 -0700
++++ httpd-2.2.3-peruser/server/mpm/config.m4	2007-09-24 22:52:22.000000000 -0600
+@@ -1,7 +1,7 @@
+ AC_MSG_CHECKING(which MPM to use)
+ AC_ARG_WITH(mpm,
+ APACHE_HELP_STRING(--with-mpm=MPM,Choose the process model for Apache to use.
+-                          MPM={beos|event|worker|prefork|mpmt_os2|metuxmpm}),[
++                          MPM={beos|event|worker|prefork|mpmt_os2|metuxmpm|peruser}),[
+   APACHE_MPM=$withval
+ ],[
+   if test "x$APACHE_MPM" = "x"; then
+@@ -23,7 +23,7 @@
+ 
+ ap_mpm_is_experimental ()
+ {
+-    if test "$apache_cv_mpm" = "event" -o "$apache_cv_mpm" = "metuxmpm"; then
++    if test "$apache_cv_mpm" = "event" -o "$apache_cv_mpm" = "metuxmpm" -o "$apache_cv_mpm" = "peruser"; then
+         return 0
+     else
+         return 1
+diff -Nur httpd-2.2.3/server/mpm/experimental/peruser/AUTHORS httpd-2.2.3-peruser/server/mpm/experimental/peruser/AUTHORS
+--- httpd-2.2.3/server/mpm/experimental/peruser/AUTHORS	1969-12-31 17:00:00.000000000 -0700
++++ httpd-2.2.3-peruser/server/mpm/experimental/peruser/AUTHORS	2007-09-28 17:29:01.000000000 -0600
+@@ -0,0 +1,9 @@
++Enrico Weigelt <weigelt [at] metux.de> (MetuxMPM maintainer)
++Sean Gabriel Heacock <gabriel [at] telana.com> (Peruser maintainer)
++Stefan Seufert <stefan [at] seuf.de>
++Janno Sannik <janno [at] kood.ee>
++Taavi Sannik <taavi [at] kood.ee>
++Rommer <rommer [at] active.by>
++Bert <bert [at] ev6.net>
++Leen Besselink <leen [at] consolejunkie.net>
++Steve Amerige <mpm [at] fatbear.com>
+diff -Nur httpd-2.2.3/server/mpm/experimental/peruser/Makefile.in httpd-2.2.3-peruser/server/mpm/experimental/peruser/Makefile.in
+--- httpd-2.2.3/server/mpm/experimental/peruser/Makefile.in	1969-12-31 17:00:00.000000000 -0700
++++ httpd-2.2.3-peruser/server/mpm/experimental/peruser/Makefile.in	2007-09-28 17:29:01.000000000 -0600
+@@ -0,0 +1,5 @@
++
++LTLIBRARY_NAME    = libperuser.la
++LTLIBRARY_SOURCES = peruser.c
++
++include $(top_srcdir)/build/ltlib.mk
+diff -Nur httpd-2.2.3/server/mpm/experimental/peruser/config.m4 httpd-2.2.3-peruser/server/mpm/experimental/peruser/config.m4
+--- httpd-2.2.3/server/mpm/experimental/peruser/config.m4	1969-12-31 17:00:00.000000000 -0700
++++ httpd-2.2.3-peruser/server/mpm/experimental/peruser/config.m4	2007-09-28 17:29:01.000000000 -0600
+@@ -0,0 +1,3 @@
++if test "$MPM_NAME" = "peruser" ; then
++    APACHE_FAST_OUTPUT(server/mpm/experimental/$MPM_NAME/Makefile)
++fi
+diff -Nur httpd-2.2.3/server/mpm/experimental/peruser/mpm.h httpd-2.2.3-peruser/server/mpm/experimental/peruser/mpm.h
+--- httpd-2.2.3/server/mpm/experimental/peruser/mpm.h	1969-12-31 17:00:00.000000000 -0700
++++ httpd-2.2.3-peruser/server/mpm/experimental/peruser/mpm.h	2007-09-28 17:29:01.000000000 -0600
+@@ -0,0 +1,103 @@
++/* ====================================================================
++ * The Apache Software License, Version 1.1
++ *
++ * Copyright (c) 2000-2003 The Apache Software Foundation.  All rights
++ * reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ *
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer.
++ *
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in
++ *    the documentation and/or other materials provided with the
++ *    distribution.
++ *
++ * 3. The end-user documentation included with the redistribution,
++ *    if any, must include the following acknowledgment:
++ *       "This product includes software developed by the
++ *        Apache Software Foundation (http://www.apache.org/)."
++ *    Alternately, this acknowledgment may appear in the software itself,
++ *    if and wherever such third-party acknowledgments normally appear.
++ *
++ * 4. The names "Apache" and "Apache Software Foundation" must
++ *    not be used to endorse or promote products derived from this
++ *    software without prior written permission. For written
++ *    permission, please contact apache at apache.org.
++ *
++ * 5. Products derived from this software may not be called "Apache",
++ *    nor may "Apache" appear in their name, without prior written
++ *    permission of the Apache Software Foundation.
++ *
++ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
++ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
++ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
++ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
++ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
++ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
++ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
++ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
++ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
++ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
++ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ * ====================================================================
++ *
++ * This software consists of voluntary contributions made by many
++ * individuals on behalf of the Apache Software Foundation.  For more
++ * information on the Apache Software Foundation, please see
++ * <http://www.apache.org/>.
++ *
++ * Portions of this software are based upon public domain software
++ * originally written at the National Center for Supercomputing Applications,
++ * University of Illinois, Urbana-Champaign.
++ */
++
++#include "httpd.h"
++#include "mpm_default.h"
++#include "scoreboard.h"
++#include "unixd.h"
++
++#ifndef APACHE_MPM_PERUSER_H
++#define APACHE_MPM_PERUSER_H
++
++#define PERUSER_MPM
++
++#define MPM_NAME "Peruser"
++
++#define AP_MPM_WANT_RECLAIM_CHILD_PROCESSES
++#define AP_MPM_WANT_WAIT_OR_TIMEOUT
++#define AP_MPM_WANT_PROCESS_CHILD_STATUS
++#define AP_MPM_WANT_SET_PIDFILE
++#define AP_MPM_WANT_SET_SCOREBOARD
++#define AP_MPM_WANT_SET_LOCKFILE
++#define AP_MPM_WANT_SET_MAX_REQUESTS
++#define AP_MPM_WANT_SET_COREDUMPDIR
++#define AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
++#define AP_MPM_WANT_SIGNAL_SERVER
++#define AP_MPM_WANT_SET_MAX_MEM_FREE
++#define AP_MPM_DISABLE_NAGLE_ACCEPTED_SOCK
++
++#define AP_MPM_USES_POD 1
++#define MPM_CHILD_PID(i) (ap_scoreboard_image->parent[i].pid)
++#define MPM_NOTE_CHILD_KILLED(i) (MPM_CHILD_PID(i) = 0)
++#define MPM_ACCEPT_FUNC unixd_accept
++
++extern int ap_threads_per_child;
++extern int ap_max_daemons_limit;
++extern server_rec *ap_server_conf;
++
++/* Table of child status */
++#define SERVER_DEAD 0
++#define SERVER_DYING 1
++#define SERVER_ALIVE 2
++
++typedef struct ap_ctable {
++    pid_t pid;
++    unsigned char status;
++} ap_ctable;
++
++#endif /* APACHE_MPM_PERUSER_H */
+diff -Nur httpd-2.2.3/server/mpm/experimental/peruser/mpm_default.h httpd-2.2.3-peruser/server/mpm/experimental/peruser/mpm_default.h
+--- httpd-2.2.3/server/mpm/experimental/peruser/mpm_default.h	1969-12-31 17:00:00.000000000 -0700
++++ httpd-2.2.3-peruser/server/mpm/experimental/peruser/mpm_default.h	2007-09-28 17:29:01.000000000 -0600
+@@ -0,0 +1,110 @@
++/* ====================================================================
++ * The Apache Software License, Version 1.1
++ *
++ * Copyright (c) 2000-2003 The Apache Software Foundation.  All rights
++ * reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ *
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer.
++ *
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in
++ *    the documentation and/or other materials provided with the
++ *    distribution.
++ *
++ * 3. The end-user documentation included with the redistribution,
++ *    if any, must include the following acknowledgment:
++ *       "This product includes software developed by the
++ *        Apache Software Foundation (http://www.apache.org/)."
++ *    Alternately, this acknowledgment may appear in the software itself,
++ *    if and wherever such third-party acknowledgments normally appear.
++ *
++ * 4. The names "Apache" and "Apache Software Foundation" must
++ *    not be used to endorse or promote products derived from this
++ *    software without prior written permission. For written
++ *    permission, please contact apache at apache.org.
++ *
++ * 5. Products derived from this software may not be called "Apache",
++ *    nor may "Apache" appear in their name, without prior written
++ *    permission of the Apache Software Foundation.
++ *
++ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
++ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
++ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
++ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
++ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
++ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
++ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
++ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
++ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
++ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
++ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ * ====================================================================
++ *
++ * This software consists of voluntary contributions made by many
++ * individuals on behalf of the Apache Software Foundation.  For more
++ * information on the Apache Software Foundation, please see
++ * <http://www.apache.org/>.
++ *
++ * Portions of this software are based upon public domain software
++ * originally written at the National Center for Supercomputing Applications,
++ * University of Illinois, Urbana-Champaign.
++ */
++
++#ifndef APACHE_MPM_DEFAULT_H
++#define APACHE_MPM_DEFAULT_H
++
++/* Number of processors to spawn off for each ServerEnvironment by default */
++
++#ifndef DEFAULT_START_PROCESSORS
++#define DEFAULT_START_PROCESSORS 0
++#endif
++
++/* Minimum number of running processors per ServerEnvironment */
++
++#ifndef DEFAULT_MIN_PROCESSORS
++#define DEFAULT_MIN_PROCESSORS 0
++#endif
++
++/* Minimum --- fewer than this, and more will be created */
++
++#ifndef DEFAULT_MIN_FREE_PROCESSORS
++#define DEFAULT_MIN_FREE_PROCESSORS 2
++#endif
++
++/* Maximum processors per ServerEnvironment */
++
++#ifndef DEFAULT_MAX_PROCESSORS
++#define DEFAULT_MAX_PROCESSORS 10
++#endif
++
++/* File used for accept locking, when we use a file */
++#ifndef DEFAULT_LOCKFILE
++#define DEFAULT_LOCKFILE DEFAULT_REL_RUNTIMEDIR "/accept.lock"
++#endif
++
++/* Where the main/parent process's pid is logged */
++#ifndef DEFAULT_PIDLOG
++#define DEFAULT_PIDLOG DEFAULT_REL_RUNTIMEDIR "/httpd.pid"
++#endif
++
++/*
++ * Interval, in microseconds, between scoreboard maintenance.
++ */
++#ifndef SCOREBOARD_MAINTENANCE_INTERVAL
++#define SCOREBOARD_MAINTENANCE_INTERVAL 1000000
++#endif
++
++/* Number of requests to try to handle in a single process.  If <= 0,
++ * the children don't die off.
++ */
++#ifndef DEFAULT_MAX_REQUESTS_PER_CHILD
++#define DEFAULT_MAX_REQUESTS_PER_CHILD 10000
++#endif
++
++#endif /* AP_MPM_DEFAULT_H */
+diff -Nur httpd-2.2.3/server/mpm/experimental/peruser/peruser.c httpd-2.2.3-peruser/server/mpm/experimental/peruser/peruser.c
+--- httpd-2.2.3/server/mpm/experimental/peruser/peruser.c	1969-12-31 17:00:00.000000000 -0700
++++ httpd-2.2.3-peruser/server/mpm/experimental/peruser/peruser.c	2007-10-03 11:28:06.000000000 -0600
+@@ -0,0 +1,3223 @@
++/* ====================================================================
++ * The Apache Software License, Version 1.1
++ *
++ * Copyright (c) 2000-2003 The Apache Software Foundation.  All rights
++ * reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ *
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer.
++ *
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in
++ *    the documentation and/or other materials provided with the
++ *    distribution.
++ *
++ * 3. The end-user documentation included with the redistribution,
++ *    if any, must include the following acknowledgment:
++ *       "This product includes software developed by the
++ *        Apache Software Foundation (http://www.apache.org/)."
++ *    Alternately, this acknowledgment may appear in the software itself,
++ *    if and wherever such third-party acknowledgments normally appear.
++ *
++ * 4. The names "Apache" and "Apache Software Foundation" must
++ *    not be used to endorse or promote products derived from this
++ *    software without prior written permission. For written
++ *    permission, please contact apache at apache.org.
++ *
++ * 5. Products derived from this software may not be called "Apache",
++ *    nor may "Apache" appear in their name, without prior written
++ *    permission of the Apache Software Foundation.
++ *
++ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
++ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
++ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
++ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
++ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
++ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
++ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
++ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
++ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
++ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
++ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ * ====================================================================
++ *
++ * This software consists of voluntary contributions made by many
++ * individuals on behalf of the Apache Software Foundation.  For more
++ * information on the Apache Software Foundation, please see
++ * <http://www.apache.org/>.
++ *
++ * Portions of this software are based upon public domain software
++ * originally written at the National Center for Supercomputing Applications,
++ * University of Illinois, Urbana-Champaign.
++ */
++
++/* Peruser version 0.3.0 */
++
++/* #define MPM_PERUSER_DEBUG */
++
++#include "apr.h"
++#include "apr_hash.h"
++#include "apr_pools.h"
++#include "apr_file_io.h"
++#include "apr_portable.h"
++#include "apr_strings.h"
++#include "apr_thread_proc.h"
++#include "apr_signal.h"
++#define APR_WANT_STDIO
++#define APR_WANT_STRFUNC
++#define APR_WANT_IOVEC
++#include "apr_want.h"
++
++#if APR_HAVE_UNISTD_H
++#include <unistd.h>
++#endif
++#if APR_HAVE_SYS_TYPES_H
++#include <sys/types.h>
++#endif
++
++#define CORE_PRIVATE
++
++#include "ap_config.h"
++#include "httpd.h"
++#include "mpm_default.h"
++#include "http_main.h"
++#include "http_log.h"
++#include "http_config.h"
++#include "http_core.h"		/* for get_remote_host */
++#include "http_connection.h"
++#include "http_protocol.h"	/* for ap_hook_post_read_request */
++#include "http_vhost.h"		/* for ap_update_vhost_given_ip */
++#include "scoreboard.h"
++#include "ap_mpm.h"
++#include "unixd.h"
++#include "mpm_common.h"
++#include "ap_listen.h"
++#include "ap_mmn.h"
++#include "apr_poll.h"
++#include "util_ebcdic.h"
++#include "mod_status.h"
++
++#ifdef HAVE_BSTRING_H
++#include <bstring.h>		/* for IRIX, FD_SET calls bzero() */
++#endif
++
++#ifdef HAVE_TIME_H
++#include <time.h>
++#endif
++
++#ifdef HAVE_SYS_PROCESSOR_H
++#include <sys/processor.h> /* for bindprocessor() */
++#endif
++
++#if APR_HAS_SHARED_MEMORY
++#include "apr_shm.h"
++#else
++#error "Peruser MPM requres shared memory support."
++#endif
++
++
++/* should be APR-ized */
++#include <grp.h>
++#include <pwd.h>
++#include <sys/stat.h>
++#include <sys/un.h>
++#include <setjmp.h>
++
++#include <signal.h>
++#include <sys/times.h>
++
++
++#ifdef MPM_PERUSER_DEBUG
++# define _DBG(text,par...) \
++    ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL, \
++                 "(peruser: pid=%d uid=%d child=%d) %s(): " text, \
++                 getpid(), getuid(), my_child_num, __FUNCTION__, ##par, 0)
++
++# define _TRACE_CALL(text,par...) _DBG("calling " text, ##par)
++# define _TRACE_RET(text,par...) _DBG("returned from " text, ##par)
++#else
++# define _DBG(text,par...)
++# define _TRACE_RET(text,par...)
++# define _TRACE_CALL(text,par...)
++#endif /* MPM_PERUSER_DEBUG */
++
++/* char of death - for signalling children to die */
++#define AP_PERUSER_CHAR_OF_DEATH        '!'
++
++#define PERUSER_SERVER_CONF(cf)        \
++    ((peruser_server_conf *) ap_get_module_config(cf, &mpm_peruser_module))
++
++#define SCOREBOARD_STATUS(i)	ap_scoreboard_image->servers[i][0].status
++
++/*
++ * Define some magic numbers that we use for the state of the incomming
++ * request. These must be < 0 so they don't collide with a file descriptor.
++ */
++#define AP_PERUSER_THISCHILD -1
++#define AP_PERUSER_OTHERCHILD -2
++
++
++/* Limit on the total --- clients will be locked out if more servers than
++ * this are needed.  It is intended solely to keep the server from crashing
++ * when things get out of hand.
++ *
++ * We keep a hard maximum number of servers, for two reasons --- first off,
++ * in case something goes seriously wrong, we want to stop the fork bomb
++ * short of actually crashing the machine we're running on by filling some
++ * kernel table.  Secondly, it keeps the size of the scoreboard file small
++ * enough that we can read the whole thing without worrying too much about
++ * the overhead.
++ */
++#ifndef DEFAULT_SERVER_LIMIT
++#define DEFAULT_SERVER_LIMIT 256
++#endif
++
++/* Admin can't tune ServerLimit beyond MAX_SERVER_LIMIT.  We want
++ * some sort of compile-time limit to help catch typos.
++ */
++#ifndef MAX_SERVER_LIMIT
++#define MAX_SERVER_LIMIT 20000
++#endif
++
++#ifndef HARD_THREAD_LIMIT
++#define HARD_THREAD_LIMIT 1
++#endif
++
++#define CHILD_TYPE_UNKNOWN      0
++#define CHILD_TYPE_MULTIPLEXER  1
++#define CHILD_TYPE_PROCESSOR    2
++#define CHILD_TYPE_WORKER       3
++
++#define CHILD_STATUS_STANDBY  0  /* wait for a request before starting */
++#define CHILD_STATUS_STARTING 1  /* wait for socket creation */
++#define CHILD_STATUS_READY    2  /* wait for mux to restart */
++#define CHILD_STATUS_ACTIVE   3  /* ready to take requests */
++#define CHILD_STATUS_RESTART  4  /* child about to die and restart */
++
++/* config globals */
++
++int ap_threads_per_child=0;         /* Worker threads per child */
++static apr_proc_mutex_t *accept_mutex;
++static int ap_min_processors=DEFAULT_MIN_PROCESSORS;
++static int ap_min_free_processors=DEFAULT_MIN_FREE_PROCESSORS;
++static int ap_max_processors=DEFAULT_MAX_PROCESSORS;
++static int ap_daemons_limit=0;      /* MaxClients */
++static int expire_timeout=1800;
++static int idle_timeout=900;
++static int server_limit = DEFAULT_SERVER_LIMIT;
++static int first_server_limit;
++static int changed_limit_at_restart;
++static int requests_this_child;
++static int mpm_state = AP_MPMQ_STARTING;
++static ap_pod_t *pod;
++
++/* === configuration stuff === */
++
++typedef struct
++{
++    int processor_id;
++
++    /* security settings */
++    uid_t uid;          /* user id */
++    gid_t gid;          /* group id */
++    const char *chroot; /* directory to chroot() to, can be null */
++
++    /* resource settings */
++    int min_processors;
++    int min_free_processors;
++    int max_processors;
++
++    /* sockets */
++    int input;          /* The socket descriptor */
++    int output;         /* The socket descriptor */
++} server_env_t;
++
++typedef struct
++{
++    apr_size_t num;
++} server_env_control;
++
++typedef struct
++{
++    server_env_control *control;
++    server_env_t *table;
++} server_env;
++
++
++typedef struct
++{
++    /* identification */
++    int id;		/* index in child_info_table */
++    pid_t pid;		/* process id */
++    int status;		/* status of child */
++    int type;           /* multiplexer or processor */
++    server_env_t *senv;
++
++    /* sockets */
++    int sock_fd;
++
++    /* stack context saved state */
++    jmp_buf jmpbuffer;
++} child_info_t;
++
++typedef struct
++{
++    /* identification */
++    int id;            /* index in child_info_table */
++    pid_t pid;         /* process id */
++    int status;                /* status of child */
++    int type;           /* multiplexer or processor */
++    apr_time_t last_used;
++} child_grace_info_t;
++
++typedef struct
++{
++    apr_size_t num;
++} child_info_control;
++
++typedef struct
++{
++    child_info_control *control;
++    child_info_t *table;
++} child_info;
++
++typedef struct
++{
++    server_env_t *senv;
++} peruser_server_conf;
++
++
++typedef struct peruser_header
++{
++    char *headers;
++    apr_pool_t *p;
++} peruser_header;
++
++
++/* Tables used to determine the user and group each child process should
++ * run as.  The hash table is used to correlate a server name with a child
++ * process.
++ */
++static apr_size_t child_info_size;
++static child_info *child_info_image;
++static child_grace_info_t *child_grace_info_table;
++struct ap_ctable *ap_child_table;
++
++#define NUM_CHILDS (child_info_image != NULL ? child_info_image->control->num : 0)
++#define CHILD_INFO_TABLE (child_info_image != NULL ? child_info_image->table : NULL)
++
++static apr_size_t server_env_size;
++static server_env *server_env_image = NULL;
++
<<Diff was trimmed, longer than 597 lines>>


More information about the pld-cvs-commit mailing list