cvs commit: apache-2.0/mpm/src/modules/mpm Makefile.tmpl mpm_prefork.c

1999-06-20 Thread jim
jim 99/06/20 16:49:39

  Modified:mpm/src  Configuration.mpm Configure
   mpm/src/main Makefile.tmpl
  Added:   mpm/src/modules/mpm Makefile.tmpl mpm_prefork.c
  Removed: mpm/src/main mpm_prefork.c
  Log:
  First cut at implementing the MPM methods as modules. Uses a new
  Configure Rule, MPM_METHOD to determine the actual method. Configure
  then automagically prepends the mpm_ on front and adds the correct
  subdir under modules. Right now, only (mpm_)prefork is enabled. Since
  this is implemented as modules, all the module Config tricks work.
  
  Revision  ChangesPath
  1.8   +1 -0  apache-2.0/mpm/src/Configuration.mpm
  
  Index: Configuration.mpm
  ===
  RCS file: /export/home/cvs/apache-2.0/mpm/src/Configuration.mpm,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Configuration.mpm 1999/06/20 21:12:47 1.7
  +++ Configuration.mpm 1999/06/20 23:49:27 1.8
  @@ -21,6 +21,7 @@
   Rule PARANOID=no
   Rule EXPAT=no
   Rule WANTHSREGEX=default
  +Rule MPM_METHOD=default
   # AddModule modules/experimental/mod_mmap_static.o
   AddModule modules/standard/mod_env.o
   AddModule modules/standard/mod_log_config.o
  
  
  
  1.6   +10 -5 apache-2.0/mpm/src/Configure
  
  Index: Configure
  ===
  RCS file: /export/home/cvs/apache-2.0/mpm/src/Configure,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Configure 1999/06/20 23:14:17 1.5
  +++ Configure 1999/06/20 23:49:28 1.6
  @@ -1478,6 +1478,11 @@
   
   echo " + adding selected modules"
   
  +##
  +# First, add the shadow MPM method module
  +##
  +echo "AddModule modules/mpm/mpm_$RULE_MPM_METHOD.o" >> $tmpfile
  +
   MODFILES=`awk <$tmpfile '($1 == "AddModule" || $1 == "SharedModule") { 
printf "%s ", $2 }'`
   MODDIRS=`awk < $tmpfile '
($1 == "Module" && $3 ~ /^modules\//) {
  @@ -1704,15 +1709,15 @@
   ## TODO: a default selected depending on the platform
   ## TODO: there should be an mpm/foo/ hierarchy for the MPM
   
  -$CAT > $awkfile <<'EOFM'
  +$CAT > $awkfile .
   *
   */
  
  /*
   * httpd.c: simple http daemon for answering WWW file requests
   *
   * 
   * 03-21-93  Rob McCool wrote original code (up to NCSA HTTPd 1.3)
   * 
   * 03-06-95  blong
   *  changed server number for child-alone processes to 0 and changed name
   *   of processes
   *
   * 03-10-95  blong
   *  Added numerous speed hacks proposed by Robert S. Thau ([EMAIL 
PROTECTED]) 
   *  including set group before fork, and call gettime before to fork
   *  to set up libraries.
   *
   * 04-14-95  rst / rh
   *  Brandon's code snarfed from NCSA 1.4, but tinkered to work with the
   *  Apache server, and also to have child processes do accept() directly.
   *
   * April-July '95 rst
   *  Extensive rework for Apache.
   */
  
  /* TODO: this

cvs commit: apache-2.0/mpm/src/modules/mpm - New directory

1999-06-20 Thread jim
jim 99/06/20 16:46:22

  apache-2.0/mpm/src/modules/mpm - New directory


cvs commit: apache-2.0/mpm/src/os/unix Makefile.tmpl

1999-06-20 Thread dgaudet
dgaudet 99/06/20 16:14:36

  Modified:mpm/src  Makefile.tmpl
   mpm/src/ap Makefile.tmpl
   mpm/src/main Makefile.tmpl
   mpm/src/modules/standard Makefile.tmpl
   mpm/src/os/unix Makefile.tmpl
  Log:
  depends
  
  Revision  ChangesPath
  1.3   +4 -3  apache-2.0/mpm/src/Makefile.tmpl
  
  Index: Makefile.tmpl
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/Makefile.tmpl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Makefile.tmpl 1999/06/18 19:07:59 1.2
  +++ Makefile.tmpl 1999/06/20 23:14:29 1.3
  @@ -124,9 +124,10 @@
   buildmark.o: buildmark.c include/ap_config.h include/ap_mmn.h \
include/ap_config_auto.h os/unix/os.h os/unix/os-inline.c \
include/ap_ctype.h include/hsregex.h include/httpd.h include/alloc.h \
  - include/buff.h include/ap.h include/apr.h include/util_uri.h
  + include/buff.h include/ap_iol.h include/ap.h include/apr.h \
  + include/util_uri.h
   modules.o: modules.c include/httpd.h include/ap_config.h \
include/ap_mmn.h include/ap_config_auto.h os/unix/os.h \
os/unix/os-inline.c include/ap_ctype.h include/hsregex.h \
  - include/alloc.h include/buff.h include/ap.h include/apr.h \
  - include/util_uri.h include/http_config.h
  + include/alloc.h include/buff.h include/ap_iol.h include/ap.h \
  + include/apr.h include/util_uri.h include/http_config.h
  
  
  
  1.4   +14 -10apache-2.0/mpm/src/ap/Makefile.tmpl
  
  Index: Makefile.tmpl
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/ap/Makefile.tmpl,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Makefile.tmpl 1999/06/19 20:41:59 1.3
  +++ Makefile.tmpl 1999/06/20 23:14:30 1.4
  @@ -39,16 +39,19 @@
&& rm Makefile.new
   
   # DO NOT REMOVE
  +ap_buf.o: ap_buf.c $(INCDIR)/ap_config.h $(INCDIR)/ap_mmn.h \
  + $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h $(OSDIR)/os-inline.c \
  + $(INCDIR)/ap_ctype.h $(INCDIR)/hsregex.h $(INCDIR)/ap_buf.h
   ap_cpystrn.o: ap_cpystrn.c $(INCDIR)/httpd.h $(INCDIR)/ap_config.h \
$(INCDIR)/ap_mmn.h $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \
$(OSDIR)/os-inline.c $(INCDIR)/ap_ctype.h $(INCDIR)/hsregex.h \
  - $(INCDIR)/alloc.h $(INCDIR)/buff.h $(INCDIR)/ap.h $(INCDIR)/apr.h \
  - $(INCDIR)/util_uri.h
  + $(INCDIR)/alloc.h $(INCDIR)/buff.h $(INCDIR)/ap_iol.h \
  + $(INCDIR)/ap.h $(INCDIR)/apr.h $(INCDIR)/util_uri.h
   ap_execve.o: ap_execve.c $(INCDIR)/httpd.h $(INCDIR)/ap_config.h \
$(INCDIR)/ap_mmn.h $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \
$(OSDIR)/os-inline.c $(INCDIR)/ap_ctype.h $(INCDIR)/hsregex.h \
  - $(INCDIR)/alloc.h $(INCDIR)/buff.h $(INCDIR)/ap.h $(INCDIR)/apr.h \
  - $(INCDIR)/util_uri.h
  + $(INCDIR)/alloc.h $(INCDIR)/buff.h $(INCDIR)/ap_iol.h \
  + $(INCDIR)/ap.h $(INCDIR)/apr.h $(INCDIR)/util_uri.h
   ap_fnmatch.o: ap_fnmatch.c $(INCDIR)/ap_config.h $(INCDIR)/ap_mmn.h \
$(INCDIR)/ap_config_auto.h $(OSDIR)/os.h $(OSDIR)/os-inline.c \
$(INCDIR)/ap_ctype.h $(INCDIR)/hsregex.h $(INCDIR)/fnmatch.h
  @@ -63,15 +66,16 @@
   ap_signal.o: ap_signal.c $(INCDIR)/httpd.h $(INCDIR)/ap_config.h \
$(INCDIR)/ap_mmn.h $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \
$(OSDIR)/os-inline.c $(INCDIR)/ap_ctype.h $(INCDIR)/hsregex.h \
  - $(INCDIR)/alloc.h $(INCDIR)/buff.h $(INCDIR)/ap.h $(INCDIR)/apr.h \
  - $(INCDIR)/util_uri.h
  + $(INCDIR)/alloc.h $(INCDIR)/buff.h $(INCDIR)/ap_iol.h \
  + $(INCDIR)/ap.h $(INCDIR)/apr.h $(INCDIR)/util_uri.h
   ap_slack.o: ap_slack.c $(INCDIR)/httpd.h $(INCDIR)/ap_config.h \
$(INCDIR)/ap_mmn.h $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \
$(OSDIR)/os-inline.c $(INCDIR)/ap_ctype.h $(INCDIR)/hsregex.h \
  - $(INCDIR)/alloc.h $(INCDIR)/buff.h $(INCDIR)/ap.h $(INCDIR)/apr.h \
  - $(INCDIR)/util_uri.h $(INCDIR)/http_log.h
  + $(INCDIR)/alloc.h $(INCDIR)/buff.h $(INCDIR)/ap_iol.h \
  + $(INCDIR)/ap.h $(INCDIR)/apr.h $(INCDIR)/util_uri.h \
  + $(INCDIR)/http_log.h
   ap_snprintf.o: ap_snprintf.c $(INCDIR)/httpd.h $(INCDIR)/ap_config.h \
$(INCDIR)/ap_mmn.h $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \
$(OSDIR)/os-inline.c $(INCDIR)/ap_ctype.h $(INCDIR)/hsregex.h \
  - $(INCDIR)/alloc.h $(INCDIR)/buff.h $(INCDIR)/ap.h $(INCDIR)/apr.h \
  - $(INCDIR)/util_uri.h
  + $(INCDIR)/alloc.h $(INCDIR)/buff.h $(INCDIR)/ap_iol.h \
  + $(INCDIR)/ap.h $(INCDIR)/apr.h $(INCDIR)/util_uri.h
  
  
  
  1.4   +64 -48apache-2.0/mpm/src/main/Makefile.tmpl
  
  Index: Makefile.tmpl
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/main/Makefile.tmpl,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Makefile.tmpl 1999/06/18 23:34:59 1.3
  +++ Makefile.tmpl 1999/06/20 23:14:31 1.4
  @@ -61,40 +61,44 @@
   alloc.o: alloc.c $(INCDIR)/httpd.h $(INC

cvs commit: apache-2.0/mpm/src Configure

1999-06-20 Thread dgaudet
dgaudet 99/06/20 16:14:18

  Modified:mpm/src  Configure
  Log:
  disable this while jim is working... no mpm/Makefile.tmpl yet
  
  Revision  ChangesPath
  1.5   +2 -1  apache-2.0/mpm/src/Configure
  
  Index: Configure
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/Configure,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Configure 1999/06/20 22:25:24 1.4
  +++ Configure 1999/06/20 23:14:17 1.5
  @@ -1594,7 +1594,8 @@
   ## Choose the right MPM method
   ## TODO:: More later
   
  -SUBDIRS="mpm/$RULE_MPM_METHOD $SUBDIRS"
  +#SUBDIRS="mpm/$RULE_MPM_METHOD $SUBDIRS"
  +SUBDIRS="$SUBDIRS"
   
   
   ## Add in the Expat library if needed/wanted.
  
  
  


cvs commit: apache-2.0/mpm/src/main http_connection.c mpm_prefork.c

1999-06-20 Thread dgaudet
dgaudet 99/06/20 16:09:54

  Modified:mpm/src/include ap_mpm.h
   mpm/src/main http_connection.c mpm_prefork.c
  Log:
  ap_mpm_graceful_stop -> ap_graceful_stop_signalled
  
  Revision  ChangesPath
  1.4   +1 -1  apache-2.0/mpm/src/include/ap_mpm.h
  
  Index: ap_mpm.h
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/include/ap_mpm.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ap_mpm.h  1999/06/20 22:05:13 1.3
  +++ ap_mpm.h  1999/06/20 23:09:51 1.4
  @@ -112,7 +112,7 @@
   
   /* predicate indicating if a graceful stop has been requested ...
  used by the connection loop */
  -API_EXPORT(int) ap_mpm_graceful_stop(void);
  +API_EXPORT(int) ap_graceful_stop_signalled(void);
   
   /* a mutex which synchronizes threads within one process */
   typedef struct ap_thread_mutex ap_thread_mutex;
  
  
  
  1.4   +1 -1  apache-2.0/mpm/src/main/http_connection.c
  
  Index: http_connection.c
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/main/http_connection.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- http_connection.c 1999/06/19 20:23:37 1.3
  +++ http_connection.c 1999/06/20 23:09:53 1.4
  @@ -206,7 +206,7 @@
   
ap_destroy_pool(r->pool);
   
  - if (ap_mpm_graceful_stop()) {
  + if (ap_graceful_stop_signalled()) {
/* XXX: hey wait, this should do a lingering_close! */
ap_bclose(c->client);
return;
  
  
  
  1.7   +3 -3  apache-2.0/mpm/src/main/mpm_prefork.c
  
  Index: mpm_prefork.c
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/main/mpm_prefork.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- mpm_prefork.c 1999/06/20 22:59:51 1.6
  +++ mpm_prefork.c 1999/06/20 23:09:53 1.7
  @@ -2377,7 +2377,7 @@
   requests_this_child = ap_max_requests_per_child = 1;
   }
   
  -int ap_mpm_graceful_stop(void)
  +int ap_graceful_stop_signalled(void)
   {
   ap_sync_scoreboard_image();
   if (deferred_die ||
  @@ -2431,7 +2431,7 @@
   }
   #endif
   
  -while (!ap_mpm_graceful_stop()) {
  +while (!ap_graceful_stop_signalled()) {
BUFF *conn_io;
   
/* Prepare to receive a SIGUSR1 due to graceful restart so that
  @@ -2581,7 +2581,7 @@
}
}
   
  - if (ap_mpm_graceful_stop()) {
  + if (ap_graceful_stop_signalled()) {
clean_child_exit(0);
}
usr1_just_die = 1;
  
  
  


cvs commit: apache-2.0/mpm/src/os/unix unixd.c unixd.h Makefile.tmpl

1999-06-20 Thread dgaudet
dgaudet 99/06/20 15:59:53

  Modified:mpm/src  CHANGES
   mpm/src/include http_config.h
   mpm/src/main mpm_prefork.c
   mpm/src/os/unix Makefile.tmpl
  Added:   mpm/src/os/unix unixd.c unixd.h
  Log:
  detach, set_group_privs, and such... these will be common amongst the
  unix MPMs, so split them off into os/unix/unixd.[ch].
  
  Revision  ChangesPath
  1.8   +3 -0  apache-2.0/mpm/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/CHANGES,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- CHANGES   1999/06/20 21:46:11 1.7
  +++ CHANGES   1999/06/20 22:59:49 1.8
  @@ -1,5 +1,8 @@
   Changes with MPM
   
  +* os/unix/unixd.[ch]: detach, setuid, setgid, stuff which will be common
  +  amongst the unix MPMs
  +
   * mpm_prefork: throw away all the alarm/timeout crud; and clean up the
 signal handling for the new world order.  [Dean Gaudet]
   
  
  
  
  1.2   +13 -13apache-2.0/mpm/src/include/http_config.h
  
  Index: http_config.h
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/include/http_config.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- http_config.h 1999/06/18 18:39:28 1.1
  +++ http_config.h 1999/06/20 22:59:50 1.2
  @@ -311,6 +311,19 @@
   /* for implementing subconfigs and customized config files */
   API_EXPORT(const char *) ap_srm_command_loop(cmd_parms *parms, void *config);
   
  +/* ap_check_cmd_context() definitions: */
  +API_EXPORT(const char *) ap_check_cmd_context(cmd_parms *cmd, unsigned 
forbidden);
  +
  +/* ap_check_cmd_context():  Forbidden in: */
  +#define  NOT_IN_VIRTUALHOST 0x01 /*  */
  +#define  NOT_IN_LIMIT   0x02 /*  */
  +#define  NOT_IN_DIRECTORY   0x04 /*  */
  +#define  NOT_IN_LOCATION0x08 /*  */
  +#define  NOT_IN_FILES   0x10 /*  */
  +#define  NOT_IN_DIR_LOC_FILE
(NOT_IN_DIRECTORY|NOT_IN_LOCATION|NOT_IN_FILES) /* 
//*/
  +#define  GLOBAL_ONLY
(NOT_IN_VIRTUALHOST|NOT_IN_LIMIT|NOT_IN_DIR_LOC_FILE)
  +
  +
   #ifdef CORE_PRIVATE
   
   extern API_VAR_EXPORT module *top_module;
  @@ -349,19 +362,6 @@
   CORE_EXPORT(const char *) ap_init_virtual_host(pool *p, const char *hostname,
server_rec *main_server, server_rec **);
   void ap_process_resource_config(server_rec *s, const char *fname, pool *p, 
pool *ptemp);
  -
  -/* ap_check_cmd_context() definitions: */
  -API_EXPORT(const char *) ap_check_cmd_context(cmd_parms *cmd, unsigned 
forbidden);
  -
  -/* ap_check_cmd_context():  Forbidden in: */
  -#define  NOT_IN_VIRTUALHOST 0x01 /*  */
  -#define  NOT_IN_LIMIT   0x02 /*  */
  -#define  NOT_IN_DIRECTORY   0x04 /*  */
  -#define  NOT_IN_LOCATION0x08 /*  */
  -#define  NOT_IN_FILES   0x10 /*  */
  -#define  NOT_IN_DIR_LOC_FILE
(NOT_IN_DIRECTORY|NOT_IN_LOCATION|NOT_IN_FILES) /* 
//*/
  -#define  GLOBAL_ONLY
(NOT_IN_VIRTUALHOST|NOT_IN_LIMIT|NOT_IN_DIR_LOC_FILE)
  -
   
   /* Module-method dispatchers, also for http_request.c */
   
  
  
  
  1.6   +13 -218   apache-2.0/mpm/src/main/mpm_prefork.c
  
  Index: mpm_prefork.c
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/main/mpm_prefork.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- mpm_prefork.c 1999/06/20 21:46:13 1.5
  +++ mpm_prefork.c 1999/06/20 22:59:51 1.6
  @@ -96,6 +96,7 @@
   #include "http_connection.h"
   #include "scoreboard_prefork.h"
   #include "ap_mpm.h"
  +#include "unixd.h"
   #ifdef USE_SHMGET_SCOREBOARD
   #include 
   #include 
  @@ -108,12 +109,6 @@
   
   /* config globals */
   
  -static uid_t ap_user_id=0;
  -static char *ap_user_name=NULL;
  -static gid_t ap_group_id=0;
  -#ifdef MULTIPLE_GROUPS
  -static gid_t group_id_list[NGROUPS_MAX];
  -#endif
   static int ap_max_requests_per_child=0;
   static char *ap_pid_fname=NULL;
   static char *ap_scoreboard_fname=NULL;
  @@ -163,7 +158,6 @@
   static int sd;
   static fd_set listenfds;
   static int listenmaxfd;
  -static pid_t pgrp;
   
   /* one_process --- debugging mode variable; can be set from the command line
* with the -X flag.  If set, this gets you the child_main loop running
  @@ -502,8 +496,8 @@
/* restrict it to use only by the appropriate user_id ... not that this
 * stops CGIs from acquiring it and dinking around with it.
 */
  - buf.sem_perm.uid = ap_user_id;
  - buf.sem_perm.gid = ap_group_id;
  + buf.sem_perm.uid = unixd_config.user_id;
  + buf.sem_perm.gid = unixd_config.group_id;
buf.sem_perm.mode = 0600;
ick.buf = &buf;
if (semctl(sem_id, 0, IPC_SET, ick) < 0) {
  @

cvs commit: apache-2.0/mpm/src Configure

1999-06-20 Thread jim
jim 99/06/20 15:25:25

  Modified:mpm/src  Configure
  Log:
  Stub of the mpm/ directory of methods
  
  Revision  ChangesPath
  1.4   +18 -0 apache-2.0/mpm/src/Configure
  
  Index: Configure
  ===
  RCS file: /export/home/cvs/apache-2.0/mpm/src/Configure,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Configure 1999/06/20 21:12:48 1.3
  +++ Configure 1999/06/20 22:25:24 1.4
  @@ -227,6 +227,7 @@
   RULE_EXPAT=`./helpers/CutRule EXPAT $file`
   RULE_SHARED_CORE=`./helpers/CutRule SHARED_CORE $file`
   RULE_SHARED_CHAIN=`./helpers/CutRule SHARED_CHAIN $file`
  +RULE_MPM_METHOD=`./helpers/CutRule MPM_METHOD $file`
   
   
   ## Rule SHARED_CORE implies required DSO support
  @@ -807,6 +808,17 @@
   fi
   
   
  +## Now handle the MPM implementation. Default to 1.3 prefork
  +##
  +if [ "x$RULE_MPM_METHOD" = "xdefault" ]; then
  + if [ "x$DEF_MPM_METHOD" = "x" ]; then
  + RULE_MPM_METHOD=prefork
  + else
  + RULE_MPM_METHOD=$DEF_MPM_METHOD
  + fi
  +fi
  +
  +
   ## Now we determine the C-compiler and optimization level
   ## to use. Settings of CC and OPTIM in Configuration have
   ## the highest precedence; next comes any settings from
  @@ -1577,6 +1589,12 @@
   SUBDIRS="regex $SUBDIRS"
   CFLAGS="$CFLAGS -DUSE_HSREGEX"
   fi
  +
  +
  +## Choose the right MPM method
  +## TODO:: More later
  +
  +SUBDIRS="mpm/$RULE_MPM_METHOD $SUBDIRS"
   
   
   ## Add in the Expat library if needed/wanted.
  
  
  


cvs commit: apache-2.0/mpm/src/mpm - New directory

1999-06-20 Thread jim
jim 99/06/20 15:18:17

  apache-2.0/mpm/src/mpm - New directory


cvs commit: apache-2.0/mpm/src/include ap_mpm.h

1999-06-20 Thread dgaudet
dgaudet 99/06/20 15:05:14

  Modified:mpm/src/include ap_mpm.h
  Log:
  documentation
  
  Revision  ChangesPath
  1.3   +48 -0 apache-2.0/mpm/src/include/ap_mpm.h
  
  Index: ap_mpm.h
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/include/ap_mpm.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ap_mpm.h  1999/06/20 21:12:49 1.2
  +++ ap_mpm.h  1999/06/20 22:05:13 1.3
  @@ -58,6 +58,54 @@
   #ifndef AP_MMN_H
   #define AP_MMN_H
   
  +/*
  +The MPM, "multi-processing model" provides an abstraction of the
  +interface with the OS for distributing incoming connections to
  +threads/process for processing.  http_main invokes the MPM, and
  +the MPM runs until a shutdown/restart has been indicated.
  +The MPM calls out to the apache core via the ap_process_connection
  +function when a connection arrives.
  +
  +The MPM may or may not be multithreaded.  In the event that it is
  +multithreaded, at any instant it guarantees a 1:1 mapping of threads
  +ap_process_connection invocations.  The only primitives the MPM
  +provides for synchronization between threads are the ap_thread_mutex
  +stuff below.
  +
  +Note: In the future it will be possible for ap_process_connection
  +to return to the MPM prior to finishing the entire connection; and
  +the MPM will proceed with asynchronous handling for the connection;
  +in the future the MPM may call ap_process_connection again -- but
  +does not guarantee it will occur on the same thread as the first call.
  +
  +The MPM further guarantees that no asynchronous behaviour such as
  +longjmps and signals will interfere with the user code that is
  +invoked through ap_process_connection.  The MPM may reserve some
  +signals for its use (i.e. SIGUSR1), but guarantees that these signals
  +are ignored when executing outside the MPM code itself.  (This
  +allows broken user code that does not handle EINTR to function
  +properly.)
  +
  +The suggested server restart and stop behaviour will be "graceful".
  +However the MPM may choose to terminate processes when the user
  +requests a non-graceful restart/stop.  When this occurs, the MPM kills
  +all threads with extreme prejudice, and destroys the pchild pool.
  +User cleanups registered in the pchild pool will be invoked at
  +this point.  (This can pose some complications, the user cleanups
  +are asynchronous behaviour not unlike longjmp/signal... but if the
  +admin is asking for a non-graceful shutdown, how much effort should
  +we put into doing it in a nice way?)
  +
  +unix/posix notes:
  +- The MPM does not set a SIGALRM handler, user code may use SIGALRM.
  + But the preferred method of handling timeouts is to use the
  + timeouts provided by the BUFF/iol abstraction.
  +- The proper setting for SIGPIPE is SIG_IGN, if user code changes it
  +for any of their own processing, it must be restored to SIG_IGN
  + prior to executing or returning to any apache code.
  +TODO: add SIGPIPE debugging check somewhere to make sure its SIG_IGN
  +*/
  +
   /* run until a restart/shutdown is indicated, return 1 for shutdown
  0 otherwise */
   API_EXPORT(int) ap_mpm_run(pool *pconf, pool *plog, server_rec *server_conf);
  
  
  


cvs commit: apache-2.0/mpm/src/main alloc.c mpm_prefork.c

1999-06-20 Thread dgaudet
dgaudet 99/06/20 14:46:14

  Modified:mpm/src  CHANGES
   mpm/src/include alloc.h
   mpm/src/main alloc.c mpm_prefork.c
  Log:
  remove 1.3 timeout code; SIGUSR1/SIGHUP/SIGTERM working again
  
  Revision  ChangesPath
  1.7   +3 -0  apache-2.0/mpm/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/CHANGES,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- CHANGES   1999/06/20 21:12:47 1.6
  +++ CHANGES   1999/06/20 21:46:11 1.7
  @@ -1,5 +1,8 @@
   Changes with MPM
   
  +* mpm_prefork: throw away all the alarm/timeout crud; and clean up the
  +  signal handling for the new world order.  [Dean Gaudet]
  +
   * Crude ap_thread_mutex abstraction so that we get the pthread stuff out
 of alloc.c for now. [Dean Gaudet]
   
  
  
  
  1.2   +0 -22 apache-2.0/mpm/src/include/alloc.h
  
  Index: alloc.h
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/include/alloc.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- alloc.h   1999/06/18 18:39:27 1.1
  +++ alloc.h   1999/06/20 21:46:12 1.2
  @@ -287,10 +287,6 @@
*
* Cleanups are identified for purposes of finding & running them off by the
* plain_cleanup and data, which should presumably be unique.
  - *
  - * NB any code which invokes register_cleanup or kill_cleanup directly
  - * is a critical section which should be guarded by block_alarms() and
  - * unblock_alarms() below...
*/
   
   API_EXPORT(void) ap_register_cleanup(pool *p, void *data,
  @@ -303,24 +299,6 @@
   /* A "do-nothing" cleanup, for register_cleanup; it's faster to do
* things this way than to test for NULL. */
   API_EXPORT_NONSTD(void) ap_null_cleanup(void *data);
  -
  -/* The time between when a resource is actually allocated, and when it
  - * its cleanup is registered is a critical section, during which the
  - * resource could leak if we got interrupted or timed out.  So, anything
  - * which registers cleanups should bracket resource allocation and the
  - * cleanup registry with these.  (This is done internally by run_cleanup).
  - *
  - * NB they are actually implemented in http_main.c, since they are bound
  - * up with timeout handling in general...
  - */
  -
  -#ifdef TPF
  -#define ap_block_alarms() (0)
  -#define ap_unblock_alarms() (0)
  -#else
  -API_EXPORT(void) ap_block_alarms(void);
  -API_EXPORT(void) ap_unblock_alarms(void);
  -#endif /* TPF */
   
   /* Common cases which want utility support..
* the note_cleanups_for_foo routines are for 
  
  
  
  1.3   +4 -4  apache-2.0/mpm/src/main/alloc.c
  
  Index: alloc.c
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/main/alloc.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- alloc.c   1999/06/20 21:12:49 1.2
  +++ alloc.c   1999/06/20 21:46:12 1.3
  @@ -303,7 +303,7 @@
   #define test_is_free(_x)
   #endif
   
  -/* Free a chain of blocks --- must be called with alarms blocked. */
  +/* Free a chain of blocks --- must be called with mutex held. */
   #ifdef POOL_DEBUG
   #define reset_block(b) do { \
   test_is_free(b); \
  @@ -383,7 +383,7 @@
   
   
   /* Get a new block, from our own free list if possible, from the system
  - * if necessary.  Must be called with alarms blocked.
  + * if necessary.  Must be called with mutex held.
*/
   
   static union block_hdr *new_block(int min_size)
  @@ -873,8 +873,8 @@
* until all the output is done.
*
* Note that this is completely safe because nothing else can
  - * allocate in this pool while ap_psprintf is running.  alarms are
  - * blocked, and the only thing outside of alloc.c that's invoked
  + * allocate in this pool while ap_psprintf is running. 
  + * The only thing outside of alloc.c that's invoked
* is ap_vformatter -- which was purposefully written to be
* self-contained with no callouts.
*/
  
  
  
  1.5   +21 -348   apache-2.0/mpm/src/main/mpm_prefork.c
  
  Index: mpm_prefork.c
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/main/mpm_prefork.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- mpm_prefork.c 1999/06/20 21:12:50 1.4
  +++ mpm_prefork.c 1999/06/20 21:46:13 1.5
  @@ -82,7 +82,6 @@
* TODO: behave like apache-1.3... here's a short list of things I think
* TODO: need cleaning up still:
* TODO: - use ralf's mm stuff for the shared mem and mutexes
  - * TODO: - eliminate the timeout stuff... 2.0 timeouts are part of the BUFF
* TODO: - abstract the Listen stuff, it's going to be common with other MPM
* TODO: - clean up scoreboard stuff when we figure out how 

cvs commit: apache-site/contributors index.html

1999-06-20 Thread pcs
pcs 99/06/20 14:42:16

  Modified:contributors index.html
  Log:
  Update occupation
  
  Revision  ChangesPath
  1.73  +4 -4  apache-site/contributors/index.html
  
  Index: index.html
  ===
  RCS file: /export/home/cvs/apache-site/contributors/index.html,v
  retrieving revision 1.72
  retrieving revision 1.73
  diff -u -r1.72 -r1.73
  --- index.html1999/06/04 13:34:52 1.72
  +++ index.html1999/06/20 21:42:12 1.73
  @@ -472,10 +472,10 @@
   
   Name: Paul Sutton
   Email: mailto:[EMAIL PROTECTED]">[EMAIL 
PROTECTED]
  -URL: http://www.ukweb.com/~paul/";> 
http://www.ukweb.com/~paul/ 
  -Organization: C2Net Europe, Ltd
  -Occupation: Technical Director 
  -Location: Leeds, UK
  +URL: http://www.awe.com/~paul/";> 
http://www.awe.com/~paul/ 
  +Organization: Microsoft
  +Occupation: Program Manager
  +Location: Seattle, USA
   Comments: I like documenting things, I really do. Why are 
you wearing white suits?
   Contributions:
   Long time Apache convert (fixed a bug in version 0.5.2). Actually
  
  
  


cvs commit: apache-2.0/mpm/src/main alloc.c http_config.c mpm_prefork.c

1999-06-20 Thread dgaudet
dgaudet 99/06/20 14:12:51

  Modified:mpm/src  CHANGES Configuration.mpm Configure
   mpm/src/include ap_mpm.h
   mpm/src/main alloc.c http_config.c mpm_prefork.c
  Log:
  crude ap_thread_mutex abstraction
  
  Revision  ChangesPath
  1.6   +3 -0  apache-2.0/mpm/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/CHANGES,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- CHANGES   1999/06/20 12:29:18 1.5
  +++ CHANGES   1999/06/20 21:12:47 1.6
  @@ -1,5 +1,8 @@
   Changes with MPM
   
  +* Crude ap_thread_mutex abstraction so that we get the pthread stuff out
  +  of alloc.c for now. [Dean Gaudet]
  +
   * Handle partial large writes correctly.
 [Ben Laurie]
   
  
  
  
  1.7   +1 -1  apache-2.0/mpm/src/Configuration.mpm
  
  Index: Configuration.mpm
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/Configuration.mpm,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Configuration.mpm 1999/06/20 15:59:56 1.6
  +++ Configuration.mpm 1999/06/20 21:12:47 1.7
  @@ -1,4 +1,4 @@
  -EXTRA_CFLAGS= -Wall #-pthread -D_THREAD_SAFE # Uncomment for FreeBSD
  +EXTRA_CFLAGS= -Wall
   EXTRA_LDFLAGS=
   EXTRA_LIBS=
   EXTRA_INCLUDES=
  
  
  
  1.3   +1 -1  apache-2.0/mpm/src/Configure
  
  Index: Configure
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/Configure,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Configure 1999/06/18 19:20:18 1.2
  +++ Configure 1999/06/20 21:12:48 1.3
  @@ -426,7 +426,7 @@
   *-linux2)
DEF_WANTHSREGEX=yes
OS='Linux'
  - CFLAGS="$CFLAGS -DLINUX=2 -pthread"
  + CFLAGS="$CFLAGS -DLINUX=2"
LIBS="$LIBS -lm"
;;
   *-linux1)
  
  
  
  1.2   +7 -0  apache-2.0/mpm/src/include/ap_mpm.h
  
  Index: ap_mpm.h
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/include/ap_mpm.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ap_mpm.h  1999/06/18 18:39:29 1.1
  +++ ap_mpm.h  1999/06/20 21:12:49 1.2
  @@ -66,6 +66,13 @@
  used by the connection loop */
   API_EXPORT(int) ap_mpm_graceful_stop(void);
   
  +/* a mutex which synchronizes threads within one process */
  +typedef struct ap_thread_mutex ap_thread_mutex;
  +API_EXPORT(ap_thread_mutex *) ap_thread_mutex_new(void);
  +API_EXPORT(void) ap_thread_mutex_lock(ap_thread_mutex *);
  +API_EXPORT(void) ap_thread_mutex_unlock(ap_thread_mutex *);
  +API_EXPORT(void) ap_thread_mutex_destroy(ap_thread_mutex *);
  +
   #ifdef HAS_OTHER_CHILD
   /*
* register an other_child -- a child which the main loop keeps track of
  
  
  
  1.2   +19 -14apache-2.0/mpm/src/main/alloc.c
  
  Index: alloc.c
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/main/alloc.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- alloc.c   1999/06/18 18:39:29 1.1
  +++ alloc.c   1999/06/20 21:12:49 1.2
  @@ -64,9 +64,9 @@
   
   #include "httpd.h"
   #include "http_log.h"
  +#include "ap_mpm.h"
   
   #include 
  -#include 
   
   #ifdef OS2
   #define INCL_DOS
  @@ -209,7 +209,7 @@
   
   
   static union block_hdr *block_freelist = NULL;
  -static pthread_mutex_t alloc_mutex = PTHREAD_MUTEX_INITIALIZER;
  +static ap_thread_mutex *alloc_mutex;
   #ifdef POOL_DEBUG
   static char *known_stack_point;
   static int stack_direction;
  @@ -343,7 +343,7 @@
   if (blok == NULL)
return; /* Sanity check --- freeing empty pool? */
   
  -(void) pthread_mutex_lock(&alloc_mutex);
  +(void) ap_thread_mutex_lock(alloc_mutex);
   old_free_list = block_freelist;
   block_freelist = blok;
   
  @@ -377,7 +377,7 @@
   num_blocks_freed += num_blocks;
   #endif
   
  -(void) pthread_mutex_unlock(&alloc_mutex);
  +(void) ap_thread_mutex_unlock(alloc_mutex);
   #endif
   }
   
  @@ -426,9 +426,9 @@
   {
   union block_hdr *blok;
   
  -(void) pthread_mutex_lock(&alloc_mutex);
  +(void) ap_thread_mutex_lock(alloc_mutex);
   blok = new_block(min_size);
  -(void) pthread_mutex_unlock(&alloc_mutex);
  +(void) ap_thread_mutex_unlock(alloc_mutex);
   return blok;
   }
   
  @@ -473,7 +473,7 @@
   union block_hdr *blok;
   root_pool *new_pool;
   
  -(void) pthread_mutex_lock(&alloc_mutex);
  +(void) ap_thread_mutex_lock(alloc_mutex);
   
   blok = new_block(ROOT_HDR_BYTES);
   new_pool = (root_pool *) blok->h.first_avail;
  @@ -487,7 +487,7 @@
   new_pool->p.first = new_pool->p.last = blok;
   new_pool->p.thread_root = new

cvs commit: apache-2.0/mpm/src/ap ap_buf.c

1999-06-20 Thread dgaudet
dgaudet 99/06/20 12:34:29

  Modified:mpm/src/include ap_buf.h
   mpm/src/ap ap_buf.c
  Log:
  some other stuff left over from hacking zero-copy
  
  Revision  ChangesPath
  1.2   +4 -0  apache-2.0/mpm/src/include/ap_buf.h
  
  Index: ap_buf.h
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/include/ap_buf.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ap_buf.h  1999/06/19 20:42:01 1.1
  +++ ap_buf.h  1999/06/20 19:34:28 1.2
  @@ -73,6 +73,7 @@
   struct ap_buf {
   ap_bufel *head;
   ap_bufel **tail;
  +unsigned size;
   };
   
   /* allocate a bufel */
  @@ -93,5 +94,8 @@
   
   /* create an iovec of the elements in buf... return number of elements used 
*/
   API_EXPORT(int) ap_buf_to_iovec(ap_buf *, struct iovec *vec, int nvec);
  +
  +/* catenate buf b onto buf a, buf b is empty after this */
  +API_EXPORT(void) ap_buf_catenate(ap_buf *a, ap_buf *b);
   
   #endif
  
  
  
  1.2   +15 -0 apache-2.0/mpm/src/ap/ap_buf.c
  
  Index: ap_buf.c
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/ap/ap_buf.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ap_buf.c  1999/06/19 20:42:00 1.1
  +++ ap_buf.c  1999/06/20 19:34:29 1.2
  @@ -76,12 +76,14 @@
   {
   b->head = NULL;
   b->tail = &b->head;
  +b->size = 0;
   }
   
   API_EXPORT(void) ap_buf_append(ap_buf *b, ap_bufel *e)
   {
   e->next = *b->tail;
   b->tail = &e->next;
  +b->size += e->end - e->start;
   }
   
   API_EXPORT(void) ap_buf_consume(ap_buf *b, int nbytes)
  @@ -90,6 +92,7 @@
   ap_bufel *n;
   int amt;
   
  +b->size -= nbytes;
   e = b->head;
   while (e && nbytes) {
amt = e->end - e->start;
  @@ -123,4 +126,16 @@
++vec;
   }
   return vec - orig;
  +}
  +
  +API_EXPORT(void) ap_buf_catenate(ap_buf *a, ap_buf *b)
  +{
  +if (b->head) {
  + *a->tail = b->head;
  + a->tail = b->tail;
  + b->head = NULL;
  + b->tail = &b->head;
  + a->size += b->size;
  + b->size = 0;
  +}
   }
  
  
  


cvs commit: apache-2.0/mpm/src Configuration.mpm

1999-06-20 Thread jim
jim 99/06/20 08:59:57

  Modified:mpm/src  Configuration.mpm
  Log:
  Thanks to Dmitry Khrustalev
  
  Revision  ChangesPath
  1.6   +2 -2  apache-2.0/mpm/src/Configuration.mpm
  
  Index: Configuration.mpm
  ===
  RCS file: /export/home/cvs/apache-2.0/mpm/src/Configuration.mpm,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Configuration.mpm 1999/06/19 22:16:03 1.5
  +++ Configuration.mpm 1999/06/20 15:59:56 1.6
  @@ -1,5 +1,5 @@
  -EXTRA_CFLAGS= -Wall
  -EXTRA_LDFLAGS= #-pthread # Uncomment for FreeBSD
  +EXTRA_CFLAGS= -Wall #-pthread -D_THREAD_SAFE # Uncomment for FreeBSD
  +EXTRA_LDFLAGS=
   EXTRA_LIBS=
   EXTRA_INCLUDES=
   EXTRA_DEPS=
  
  
  


Re: cvs commit: apache-2.0/mpm/src Configuration.mpm

1999-06-20 Thread Ben Laurie
[EMAIL PROTECTED] wrote:
> 
> jim 99/06/19 15:16:04
> 
>   Modified:mpm/src  Configuration.mpm
>   Log:
>   FreeBSD requires this to grab the thread
>   lib for pthreads. Uncomment when trying on that

I used -lc_r - is there a difference?

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
 - Indira Gandhi


cvs commit: apache-2.0/mpm/src CHANGES

1999-06-20 Thread ben
ben 99/06/20 05:29:19

  Modified:mpm/src  CHANGES
  Log:
  Document changes.
  
  Revision  ChangesPath
  1.5   +7 -0  apache-2.0/mpm/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache-2.0/mpm/src/CHANGES,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- CHANGES   1999/06/19 18:10:03 1.4
  +++ CHANGES   1999/06/20 12:29:18 1.5
  @@ -1,5 +1,12 @@
   Changes with MPM
   
  +* Handle partial large writes correctly.
  +  [Ben Laurie]
  +
  +* Eliminate conn_rec's pointer to server. All it knows is the base server
  +  based on IP/port
  +  [Ben Laurie]
  +
   * Port a bunch of modules to the new module structure.
 ["Michael H. Voase" <[EMAIL PROTECTED]>]
   
  
  
  


cvs commit: apache-2.0/mpm/src/main http_request.c

1999-06-20 Thread ben
ben 99/06/20 05:27:10

  Modified:mpm/src/main http_request.c
  Log:
  Whoops. Undo unintentional change.
  
  Revision  ChangesPath
  1.4   +1 -7  apache-2.0/mpm/src/main/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_request.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- http_request.c1999/06/20 12:25:54 1.3
  +++ http_request.c1999/06/20 12:27:10 1.4
  @@ -1241,13 +1241,7 @@
* it's the application that's stalled.
*/
   /* TODO: re-implement ap_bhalfduplex... not sure how yet */
  -#if 0
  -ap_bhalfduplex(r->connection->client);
  -#else
  -//in the meantime, flush!
  -ap_bflush(r->connection->client);
  -#endif
  -
  +//ap_bhalfduplex(r->connection->client);
   ap_log_transaction(r);
   }
   
  
  
  


cvs commit: apache-2.0/mpm/src/main buff.c http_request.c

1999-06-20 Thread ben
ben 99/06/20 05:25:55

  Modified:mpm/src/main buff.c http_request.c
  Log:
  Handle partial large writes.
  
  Revision  ChangesPath
  1.4   +5 -1  apache-2.0/mpm/src/main/buff.c
  
  Index: buff.c
  ===
  RCS file: /export/home/cvs/apache-2.0/mpm/src/main/buff.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- buff.c1999/06/18 23:34:59 1.3
  +++ buff.c1999/06/20 12:25:54 1.4
  @@ -551,7 +551,11 @@
*/
   if (fb->outcnt > 0 && nbyte > LARGE_WRITE_THRESHOLD
&& nbyte + fb->outcnt >= fb->bufsiz) {
  - return large_write(fb, buf, nbyte);
  + int n=large_write(fb, buf, nbyte);
  + if (n == nbyte)
  + return nbyte;
  + buf+=n;
  + nbyte-=n;
   }
   
   /*
  
  
  
  1.3   +7 -1  apache-2.0/mpm/src/main/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_request.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- http_request.c1999/06/18 23:35:00 1.2
  +++ http_request.c1999/06/20 12:25:54 1.3
  @@ -1241,7 +1241,13 @@
* it's the application that's stalled.
*/
   /* TODO: re-implement ap_bhalfduplex... not sure how yet */
  -//ap_bhalfduplex(r->connection->client);
  +#if 0
  +ap_bhalfduplex(r->connection->client);
  +#else
  +//in the meantime, flush!
  +ap_bflush(r->connection->client);
  +#endif
  +
   ap_log_transaction(r);
   }
   
  
  
  


cvs commit: apache-2.0/mpm/src/main http_protocol.c http_vhost.c mpm_prefork.c

1999-06-20 Thread ben
ben 99/06/20 04:19:48

  Modified:mpm/src/include httpd.h
   mpm/src/main http_protocol.c http_vhost.c mpm_prefork.c
  Log:
  Server is not a per-connection thing. This also makes virtual hosts work 
better.
  
  Revision  ChangesPath
  1.2   +0 -1  apache-2.0/mpm/src/include/httpd.h
  
  Index: httpd.h
  ===
  RCS file: /export/home/cvs/apache-2.0/mpm/src/include/httpd.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- httpd.h   1999/06/18 18:39:28 1.1
  +++ httpd.h   1999/06/20 11:19:45 1.2
  @@ -833,7 +833,6 @@
   struct conn_rec {
   
   ap_pool *pool;
  -server_rec *server;
   server_rec *base_server; /* Physical vhost this conn come in on */
   void *vhost_lookup_data; /* used by http_vhost.c */
   
  
  
  
  1.5   +1 -2  apache-2.0/mpm/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===
  RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_protocol.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- http_protocol.c   1999/06/19 20:23:37 1.4
  +++ http_protocol.c   1999/06/20 11:19:46 1.5
  @@ -931,8 +931,7 @@
   r = ap_pcalloc(p, sizeof(request_rec));
   r->pool= p;
   r->connection  = conn;
  -conn->server   = conn->base_server;
  -r->server  = conn->server;
  +r->server  = conn->base_server;
   
   conn->keptalive= conn->keepalive == 1;
   conn->keepalive= 0;
  
  
  
  1.2   +4 -4  apache-2.0/mpm/src/main/http_vhost.c
  
  Index: http_vhost.c
  ===
  RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_vhost.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- http_vhost.c  1999/06/18 18:39:30 1.1
  +++ http_vhost.c  1999/06/20 11:19:46 1.2
  @@ -832,7 +832,7 @@
   
   found:
   /* s is the first matching server, we're done */
  -r->server = r->connection->server = s;
  +r->server = s;
   }
   
   
  @@ -871,7 +871,7 @@
   (s->path[s->pathlen - 1] == '/' ||
r->uri[s->pathlen] == '/' ||
r->uri[s->pathlen] == '\0')) {
  -r->server = r->connection->server = s;
  +r->server = s;
return;
}
   }
  @@ -907,7 +907,7 @@
   if (trav) {
/* save the name_chain for later in case this is a name-vhost */
conn->vhost_lookup_data = trav->names;
  - conn->server = trav->server;
  + conn->base_server = trav->server;
return;
   }
   
  @@ -919,7 +919,7 @@
   /* maybe there's a default server matching this port */
   trav = find_default_server(port);
   if (trav) {
  - conn->server = trav->server;
  + conn->base_server = trav->server;
   }
   
   /* otherwise we're stuck with just the main server */
  
  
  
  1.3   +3 -4  apache-2.0/mpm/src/main/mpm_prefork.c
  
  Index: mpm_prefork.c
  ===
  RCS file: /export/home/cvs/apache-2.0/mpm/src/main/mpm_prefork.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- mpm_prefork.c 1999/06/19 21:56:27 1.2
  +++ mpm_prefork.c 1999/06/20 11:19:47 1.3
  @@ -835,10 +835,10 @@
   if (timeout_req != NULL)
dirconf = timeout_req->per_dir_config;
   else
  - dirconf = current_conn->server->lookup_defaults;
  + dirconf = current_conn->base_server->lookup_defaults;
   if (!current_conn->keptalive) {
ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO,
  -  current_conn->server, "[client %s] %s timed out",
  +  current_conn->base_server, "[client %s] %s timed out",
 current_conn->remote_ip,
 timeout_name ? timeout_name : "request");
   }
  @@ -2434,8 +2434,7 @@
   
   conn->pool = p;
   conn->local_addr = *saddr;
  -conn->server = server; /* just a guess for now */
  -conn->base_server = conn->server;
  +conn->base_server = server;
   conn->client = inout;
   
   conn->remote_addr = *remaddr;