cvs commit: apache-1.3/src/test check_chunked
dgaudet 99/08/12 17:51:35 Modified:src/test check_chunked Log: newer perls complain about \r in hex, whatever Revision ChangesPath 1.3 +2 -2 apache-1.3/src/test/check_chunked Index: check_chunked === RCS file: /home/cvs/apache-1.3/src/test/check_chunked,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- check_chunked 1998/02/07 21:14:18 1.2 +++ check_chunked 1999/08/13 00:51:35 1.3 @@ -24,9 +24,9 @@ for(;;) { $_ = || die unexpected end of file!\n; -m#^[0-9a-f]+ *\r$#i || die bogus chunklen: $_; +m#^([0-9a-f]+) *\r$#i || die bogus chunklen: $_; -my $chunklen = hex; +my $chunklen = hex($1); exit 0 if ($chunklen == 0);
cvs commit: apache-1.3/src/helpers binbuild.sh
randy 99/08/12 20:26:30 Modified:src CHANGES src/helpers binbuild.sh Log: Add -R flag to apachectl for binary builds to work around lack of absolute path to ./libexec directory for SHARED_CORE architectures that need to load libhttp.ep. Revision ChangesPath 1.1417+5 -0 apache-1.3/src/CHANGES Index: CHANGES === RCS file: /home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.1416 retrieving revision 1.1417 diff -u -r1.1416 -r1.1417 --- CHANGES 1999/08/12 18:09:58 1.1416 +++ CHANGES 1999/08/13 03:26:21 1.1417 @@ -1,5 +1,10 @@ Changes with Apache 1.3.9 + *) For binary builds, add -R flag to apachectl to work around the +lack of an absolute path to the ./libexec directory where +libhttp.ep file is needed for SHARED_CORE architectures. +[Randy Terbush [EMAIL PROTECTED] + *) Roll back (re)naming in the uuencode/decode section. The ap/ap_ routines are now called ap_base64* and are 'plain'. I.e. no pool access or anything clever. Inside apache the routines 1.13 +1 -1 apache-1.3/src/helpers/binbuild.sh Index: binbuild.sh === RCS file: /home/cvs/apache-1.3/src/helpers/binbuild.sh,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- binbuild.sh 1999/08/10 16:06:52 1.12 +++ binbuild.sh 1999/08/13 03:26:29 1.13 @@ -223,7 +223,7 @@ echo -e \s;[EMAIL PROTECTED]@;\$SR/conf;\ bindist/bin/apxs \$SR/bin/apxs \ echo sed -e \s;^#!/.*;#!\$PERL;\ bindist/bin/dbmmanage \$SR/bin/dbmmanage \ echo sed -e \s%/usr/local/apache%\$SR%\ \$SR/conf/httpd.conf.default \$SR/conf/httpd.conf \ - echo sed -e \s%PIDFILE=%PIDFILE=\$SR/%\ -e \s%HTTPD=%HTTPD=$SR/%\ -e \s%httpd\$%httpd -d \$SR\\\%\ bindist/bin/apachectl \$SR/bin/apachectl \ + echo sed -e \s%PIDFILE=%PIDFILE=\$SR/%\ -e \s%HTTPD=%HTTPD=$SR/%\ -e \s%httpd\$%httpd -d \$SR -R \$SR/libexec\\\%\ bindist/bin/apachectl \$SR/bin/apachectl \ echo\ echo echo \Ready.\ \ echo echo \ ++\ \
cvs commit: apache-1.3 configure
rse 99/08/12 23:36:16 Modified:src CHANGES .configure Log: Fixed generated AddModule adjustments in APACI's `configure' script in order to allow (new) modules like mod_vhost_alias to be handled correctly (which was touched by the adjustments for mod_alias). Revision ChangesPath 1.1418+5 -0 apache-1.3/src/CHANGES Index: CHANGES === RCS file: /home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.1417 retrieving revision 1.1418 diff -u -r1.1417 -r1.1418 --- CHANGES 1999/08/13 03:26:21 1.1417 +++ CHANGES 1999/08/13 06:36:14 1.1418 @@ -1,5 +1,10 @@ Changes with Apache 1.3.9 + *) Fixed generated AddModule adjustments in APACI's `configure' script in + order to allow (new) modules like mod_vhost_alias to be handled correctly + (which was touched by the adjustments for mod_alias). + [Ralf S. Engelschall] + *) For binary builds, add -R flag to apachectl to work around the lack of an absolute path to the ./libexec directory where libhttp.ep file is needed for SHARED_CORE architectures. 1.100 +11 -5 apache-1.3/configure Index: configure === RCS file: /home/cvs/apache-1.3/configure,v retrieving revision 1.99 retrieving revision 1.100 diff -u -r1.99 -r1.100 --- configure 1999/08/12 13:39:33 1.99 +++ configure 1999/08/13 06:36:16 1.100 @@ -1393,22 +1393,28 @@ fi # generate module directives +# (paths are modules/foo/mod_bar.ext and modules/foo/libbar.ext) OIFS=$IFS IFS=':' for module in $modules; do eval add=\$module_$module if [ x$add = xyes ]; then -echo $SEO s%^.*\\(AddModule.*[_b/]$module\\..*\\)%\\1%g $sedsubst -echo $SEO s%^.*\\(SharedModule.*[_b/]$module\\..*\\)%\\1%g $sedsubst +echo $SEO s%^.*\\(AddModule.*mod_$module\\..*\\)%\\1%g $sedsubst +echo $SEO s%^.*\\(AddModule.*lib$module\\..*\\)%\\1%g $sedsubst +echo $SEO s%^.*\\(SharedModule.*mod_$module\\..*\\)%\\1%g $sedsubst +echo $SEO s%^.*\\(SharedModule.*lib$module\\..*\\)%\\1%g $sedsubst m=yes else -echo $SEO s%^.*\\(AddModule.*[_b/]$module\\..*\\)%# \\1%g $sedsubst -echo $SEO s%^.*\\(SharedModule.*[_b/]$module\\..*\\)%# \\1%g $sedsubst +echo $SEO s%^.*\\(AddModule.*mod_$module\\..*\\)%# \\1%g $sedsubst +echo $SEO s%^.*\\(AddModule.*lib$module\\..*\\)%# \\1%g $sedsubst +echo $SEO s%^.*\\(SharedModule.*mod_$module\\..*\\)%# \\1%g $sedsubst +echo $SEO s%^.*\\(SharedModule.*lib$module\\..*\\)%# \\1%g $sedsubst m=no fi eval share=\$shared_$module if [ x$share = xyes ]; then -echo $SEO s%^\\(.*\\)AddModule\\(.*[_b/]$module\\.\\)[oam].*\\(.*\\)%\\1SharedModule\\2so\\3%g $sedsubst +echo $SEO s%^\\(.*\\)AddModule\\(.*mod_$module\\.\\)[oam].*\\(.*\\)%\\1SharedModule\\2so\\3%g $sedsubst +echo $SEO s%^\\(.*\\)AddModule\\(.*lib$module\\.\\)[oam].*\\(.*\\)%\\1SharedModule\\2so\\3%g $sedsubst m=$m [shared] fi if [ x$verbose = xyes ]; then
cvs commit: apache-1.3/src CHANGES
rse 99/08/12 23:37:54 Modified:src CHANGES Log: fix indentation Revision ChangesPath 1.1419+10 -10apache-1.3/src/CHANGES Index: CHANGES === RCS file: /home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.1418 retrieving revision 1.1419 diff -u -r1.1418 -r1.1419 --- CHANGES 1999/08/13 06:36:14 1.1418 +++ CHANGES 1999/08/13 06:37:51 1.1419 @@ -5,17 +5,17 @@ (which was touched by the adjustments for mod_alias). [Ralf S. Engelschall] - *) For binary builds, add -R flag to apachectl to work around the -lack of an absolute path to the ./libexec directory where -libhttp.ep file is needed for SHARED_CORE architectures. -[Randy Terbush [EMAIL PROTECTED] + *) For binary builds, add -R flag to apachectl to work around the + lack of an absolute path to the ./libexec directory where + libhttp.ep file is needed for SHARED_CORE architectures. + [Randy Terbush [EMAIL PROTECTED] - *) Roll back (re)naming in the uuencode/decode section. The ap/ap_ -routines are now called ap_base64* and are 'plain'. I.e. no -pool access or anything clever. Inside apache the routines -acting like pstrdup are called ap_puuencode() and ap_uudecode(). -The odly named ap_uuencode(), ap_uudecode() is kept around for -now but depricated. [dirkx] + *) Roll back (re)naming in the uuencode/decode section. The ap/ap_ + routines are now called ap_base64* and are 'plain'. I.e. no + pool access or anything clever. Inside apache the routines + acting like pstrdup are called ap_puuencode() and ap_uudecode(). + The odly named ap_uuencode(), ap_uudecode() is kept around for + now but depricated. [dirkx] Changes with Apache 1.3.8
cvs commit: apache-2.0/mpm/conf httpd.conf-dist
rse 99/08/12 23:54:06 Modified:mpm/conf httpd.conf-dist Log: A few corrections to dexter default config. Thanks to Manoj for making it clear Revision ChangesPath 1.6 +6 -6 apache-2.0/mpm/conf/httpd.conf-dist Index: httpd.conf-dist === RCS file: /home/cvs/apache-2.0/mpm/conf/httpd.conf-dist,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- httpd.conf-dist 1999/08/12 13:53:48 1.5 +++ httpd.conf-dist 1999/08/13 06:54:05 1.6 @@ -142,12 +142,12 @@ /IfModule # dexter MPM -# NumServers ... number of server processes to start -# StartThreads . number of worker threads to start in each server process -# MinSpareThreads .. minimum number of worker threads which are kept spare -# MaxSpareThreads .. maximum number of worker threads which are kept spare -# MaxThreadsPerChild ... maximum number of worker threads allowed to start -# MaxRequestsPerChild .. maximum number of requests a worker thread serves +# NumServers ... constant number of server processes +# StartThreads . initial number of worker threads in each server process +# MinSpareThreads .. minimum number of worker threads which are kept spare +# MaxSpareThreads .. maximum number of worker threads which are kept spare +# MaxThreadsPerChild ... maximum number of worker threads in each server process +# MaxRequestsPerChild .. maximum number of connections per server process (then it dies) IfModule dexter.c NumServers 5 StartThreads 5
cvs commit: apache-2.0/mpm/src/modules/mpm/winnt winnt.c
manoj 99/08/12 23:58:14 Modified:mpm/src/include http_connection.h httpd.h mpm/src/main http_connection.c mpm/src/modules/mpm/dexter dexter.c mpm/src/modules/mpm/mpmt_pthread mpmt_pthread.c mpm/src/modules/mpm/prefork prefork.c mpm/src/modules/mpm/spmt_os2 spmt_os2.c mpm/src/modules/mpm/winnt winnt.c Log: Add a connection ID to conn_rec. It uniquely identifies a connection at any instant in time. It's not very well tested yet. Revision ChangesPath 1.7 +1 -1 apache-2.0/mpm/src/include/http_connection.h Index: http_connection.h === RCS file: /home/cvs/apache-2.0/mpm/src/include/http_connection.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -u -r1.6 -r1.7 --- http_connection.h 1999/08/05 19:56:04 1.6 +++ http_connection.h 1999/08/13 06:57:30 1.7 @@ -66,7 +66,7 @@ conn_rec *ap_new_connection(pool *p, server_rec *server, BUFF *inout, const struct sockaddr_in *remaddr, - const struct sockaddr_in *saddr); + const struct sockaddr_in *saddr, long id); CORE_EXPORT(void) ap_process_connection(conn_rec *); int ap_process_http_connection(conn_rec *); 1.12 +2 -0 apache-2.0/mpm/src/include/httpd.h Index: httpd.h === RCS file: /home/cvs/apache-2.0/mpm/src/include/httpd.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -u -r1.11 -r1.12 --- httpd.h 1999/08/06 00:54:19 1.11 +++ httpd.h 1999/08/13 06:57:33 1.12 @@ -816,6 +816,8 @@ char *local_host;/* used for ap_get_server_name when * UseCanonicalName is set to DNS * (ignores setting of HostnameLookups) */ +long id;/* ID of this connection; unique at any + * point in time */ void *conn_config; /* Notes on *this* connection */ }; 1.17 +3 -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.16 retrieving revision 1.17 diff -u -d -u -r1.16 -r1.17 --- http_connection.c 1999/08/06 00:54:29 1.16 +++ http_connection.c 1999/08/13 06:57:40 1.17 @@ -258,7 +258,7 @@ conn_rec *ap_new_connection(pool *p, server_rec *server, BUFF *inout, const struct sockaddr_in *remaddr, - const struct sockaddr_in *saddr) + const struct sockaddr_in *saddr, long id) { conn_rec *conn = (conn_rec *) ap_pcalloc(p, sizeof(conn_rec)); @@ -278,6 +278,8 @@ conn-remote_addr = *remaddr; conn-remote_ip = ap_pstrdup(conn-pool, inet_ntoa(conn-remote_addr.sin_addr)); + +conn-id = id; return conn; } 1.22 +43 -33apache-2.0/mpm/src/modules/mpm/dexter/dexter.c Index: dexter.c === RCS file: /home/cvs/apache-2.0/mpm/src/modules/mpm/dexter/dexter.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -u -r1.21 -r1.22 --- dexter.c 1999/08/12 02:02:27 1.21 +++ dexter.c 1999/08/13 06:57:46 1.22 @@ -145,18 +145,17 @@ static pool *pconf; /* Pool for config stuff */ static pool *pchild; /* Pool for httpd child stuff */ - -typedef struct { -pool *pool; -pthread_mutex_t mutex; -pthread_attr_t attr; -} worker_thread_info; +static pool *thread_pool_parent; /* Parent of per-thread pools */ +static pthread_mutex_t thread_pool_create_mutex; +static int child_num; static int my_pid; /* Linux getpid() doesn't work except in main thread. Use this instead */ /* Keep track of the number of worker threads currently active */ static int worker_thread_count; static pthread_mutex_t worker_thread_count_mutex; +static int worker_thread_free_ids[HARD_THREAD_LIMIT]; +static pthread_attr_t worker_thread_attr; /* Keep track of the number of idle worker threads */ static int idle_thread_count; @@ -849,7 +848,8 @@ * Child process main loop. */ -static void process_socket(pool *p, struct sockaddr *sa_client, int csd) +static void process_socket(pool *p, struct sockaddr *sa_client, int csd, + int conn_id) { struct sockaddr sa_server; /* */ size_t len = sizeof(struct sockaddr); @@ -886,7 +886,8 @@ current_conn =
cvs commit: apache-1.3 Makefile.tmpl
martin 99/08/12 23:58:24 Modified:.Makefile.tmpl Log: Ensure that the installed expat include files are world readable, just like the other header files. Revision ChangesPath 1.88 +1 -1 apache-1.3/Makefile.tmpl Index: Makefile.tmpl === RCS file: /export/home/cvs/apache-1.3/Makefile.tmpl,v retrieving revision 1.87 retrieving revision 1.88 diff -u -r1.87 -r1.88 --- Makefile.tmpl 1999/07/26 18:29:45 1.87 +++ Makefile.tmpl 1999/08/13 06:58:18 1.88 @@ -434,7 +434,7 @@ $(CP) $(TOP)/$(SRC)/$${osdir}/os.h $(root)$(includedir)/; \ echo $(CP) $(TOP)/$(SRC)/$${osdir}/os-inline.c $(root)$(includedir)/; \ $(CP) $(TOP)/$(SRC)/$${osdir}/os-inline.c $(root)$(includedir)/ - chmod 644 $(root)$(includedir)/*.h + chmod 644 $(root)$(includedir)/*.h $(root)$(includedir)/xml/*.h @echo === [include] # create an initial document root containing the Apache manual,
cvs commit: apache-1.3 STATUS
martin 99/08/13 00:17:11 Modified:.STATUS Log: Note problem with 300/304 return codes without Location: header (this bug breaks mod_speling) Revision ChangesPath 1.740 +8 -1 apache-1.3/STATUS Index: STATUS === RCS file: /export/home/cvs/apache-1.3/STATUS,v retrieving revision 1.739 retrieving revision 1.740 diff -u -r1.739 -r1.740 --- STATUS1999/08/09 17:46:13 1.739 +++ STATUS1999/08/13 07:17:08 1.740 @@ -1,5 +1,5 @@ 1.3 STATUS: - Last modified at [$Date: 1999/08/09 17:46:13 $] + Last modified at [$Date: 1999/08/13 07:17:08 $] Release: @@ -65,6 +65,13 @@ mips-unknown-linuxno Lars Eilebrecht RELEASE SHOWSTOPPERS: + +* Responses with a return code HTTP_NOT_MODIFIED or HTTP_MULTIPLE_CHOICES + are broken if they do not supply a Location: header. + mod_speling ceases to work because of this bug. + Message-ID: [EMAIL PROTECTED] + Status: patch available, but Tony Finch suggests fixing the + ap_is_HTTP_REDIRECT() macro RELEASE NON-SHOWSTOPPERS BUT WOULD BE REAL NICE TO WRAP THESE UP:
cvs commit: apache-1.3/src/modules/experimental mod_auth_digest.c
ronald 99/08/13 00:18:08 Modified:src/modules/experimental mod_auth_digest.c Log: - Print out pointer to Rule DEV_RANDOM when truerand lib not found - Fix test-compile check to check for randbyte instead of trand32 - use ap_base64encode_binary/decode instead of our own copy - Tweak to make Amaya happier Revision ChangesPath 1.5 +14 -174 apache-1.3/src/modules/experimental/mod_auth_digest.c Index: mod_auth_digest.c === RCS file: /home/cvs/apache-1.3/src/modules/experimental/mod_auth_digest.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- mod_auth_digest.c 1999/08/10 15:47:56 1.4 +++ mod_auth_digest.c 1999/08/13 07:18:05 1.5 @@ -95,13 +95,14 @@ RULE_DEV_RANDOM=/dev/urandom else RULE_DEV_RANDOM=truerand - if helpers/TestCompile func trand32; then + if helpers/TestCompile func randbyte; then : - elif helpers/TestCompile lib rand trand32; then + elif helpers/TestCompile lib rand randbyte; then : else echo (mod_auth_digest) truerand library missing! echo ** This will most probably defeat successful compilation. + echo ** See Rule DEV_RANDOM in src/Configuration.tmpl for more information. fi fi fi @@ -387,7 +388,7 @@ return; failed: -if (!client_mm || (client_list client_list-table !opaque_mm) +if (!client_mm || (client_list client_list-table !opaque_mm) || (opaque_cntr !otn_count_mm)) ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, s, Digest: failed to create shared memory segments; reason @@ -605,169 +606,6 @@ }; -/* - * base-64 encoding helpers - */ - -/* this is copied from util.c, with toascii folded into the table for EBCDIC */ -static const unsigned char pr2six[256] = -{ -#ifndef CHARSET_EBCDIC -/* ASCII table */ -64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, -64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, -64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 62, 64, 64, 64, 63, -52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 64, 64, 64, 64, 64, 64, -64, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, -15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 64, 64, 64, 64, 64, -64, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, -41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 64, 64, 64, 64, 64, -64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, -64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, -64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, -64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, -64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, -64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, -64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, -64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64 -#else /*CHARSET_EBCDIC*/ -/* EBCDIC table */ -64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, -64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, -64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, -64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, -64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 62, 64, -64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, -64, 63, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, -64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, -64, 26, 27, 28, 29, 30, 31, 32, 33, 34, 64, 64, 64, 64, 64, 64, -64, 35, 36, 37, 38, 39, 40, 41, 42, 43, 64, 64, 64, 64, 64, 64, -64, 64, 44, 45, 46, 47, 48, 49, 50, 51, 64, 64, 64, 64, 64, 64, -64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, -64, 0, 1, 2, 3, 4, 5, 6, 7, 8, 64, 64, 64, 64, 64, 64, -64, 9, 10, 11, 12, 13, 14, 15, 16, 17, 64, 64, 64, 64, 64, 64, -64, 64, 18, 19, 20, 21, 22, 23, 24, 25, 64, 64, 64, 64, 64, 64, -52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 64, 64, 64, 64, 64, 64, -#endif /*CHARSET_EBCDIC*/ -}; - -/* this is the same as ap_uudecode in util.c, but returns the length instead - * of a pointer to the decoded data and takes a pointer to the decoded buffer - * as a third parameter. Also, for EBCDIC machines the toebcdic[] on the ouput - * is left out because we want a binary result. - */ -static int base64decode(pool *p, const char *bufcoded, unsigned char **bufplain) -{ -int nbytesdecoded; -register const unsigned char *bufin; -register unsigned char *bufout; -register int
cvs commit: apache-1.3 configure
bjh 99/08/13 08:05:49 Modified:.configure Log: Translate module names to dll names for OS/2 so that they are no more than 8 characters long and have an extension of dll instead of so. Revision ChangesPath 1.101 +9 -0 apache-1.3/configure Index: configure === RCS file: /home/cvs/apache-1.3/configure,v retrieving revision 1.100 retrieving revision 1.101 diff -u -r1.100 -r1.101 --- configure 1999/08/13 06:36:16 1.100 +++ configure 1999/08/13 15:05:48 1.101 @@ -1423,6 +1423,15 @@ done IFS=$OIFS +# translate module names to dll names for OS/2 so that they are no more +# than 8 characters long and have an extension of dll instead of so +case $PLATFORM in +*OS/2* ) +echo $SEO s%/mod_\\(.\\{1,8\\}\\).*\\.so%/\\1\\.dll% $sedsubst +echo $SEO s%/\\(lib.*\\)\\.so$%/\\1.dll% $sedsubst +;; +esac + # split sedsubst into chunks of 50 commands # to workaround limits in braindead seds files=`$AWK $sedsubst '
cvs commit: apache-2.0/mpm/src/os/unix iol_socket.c
rse 99/08/13 08:52:03 Modified:mpm/src/os/unix iol_socket.c Log: Hell, what a subtle problem which caused me four hours this afternoon to find. It's not exactly specified (even POSIX does it once this time and once this time) whether read() returns EWOULDBLOCK or EAGAIN. SysV usually returns EAGAIN, BSD usually EWOULDBLOCK. So we have to check for _both_ errno values, of course. This occured for me the first time after I've tried ``ab -n 1000 en1:8080/index.txt'' where index.txt is a very large file (3MB). Then the sockets block often even for write operations and then the return value was not recognized correctly... :-( Revision ChangesPath 1.3 +1 -1 apache-2.0/mpm/src/os/unix/iol_socket.c Index: iol_socket.c === RCS file: /home/cvs/apache-2.0/mpm/src/os/unix/iol_socket.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- iol_socket.c 1999/06/28 19:00:50 1.2 +++ iol_socket.c 1999/08/13 15:52:01 1.3 @@ -176,7 +176,7 @@ if (rv = 0) { \ return rv; \ } \ - if (errno == EWOULDBLOCK iol-timeout != 0) { \ + if ((errno == EWOULDBLOCK || errno == EAGAIN) iol-timeout != 0) { \ return unix_##name##_timeout(viol, arg1, arg2); \ } \ return -1; \
cvs commit: apache-2.0/mpm README.rse
rse 99/08/13 09:01:12 Modified:mpm README.rse Log: Ops, Pth 1.1b3 has broken writev() semantics under blocking mode and a broken select() in case of timeouts. This caused problems for large transfers with Apache/mpm-dexter-pth. With 1.1b4 it is now gone, so use this version. Revision ChangesPath 1.6 +5 -5 apache-2.0/mpm/README.rse Index: README.rse === RCS file: /home/cvs/apache-2.0/mpm/README.rse,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- README.rse1999/08/12 13:25:26 1.5 +++ README.rse1999/08/13 16:01:11 1.6 @@ -33,11 +33,11 @@ [the portable hybrid (preforking+prethreading) process model] $ cd ROOT/apache-mpm - $ lynx ftp://alpha.gnu.org/gnu/pth/pth-1.1b3.tar.gz + $ lynx ftp://alpha.gnu.org/gnu/pth/pth-1.1b4.tar.gz [You can use also any later Pth version, of course. ] [Especially release versions = 1.1.0 from ftp://ftp.gnu.org/gnu/pth/] - $ gunzip pth-1.1b3.tar.gz | tar xvf - - $ cd pth-1.1b3 + $ gunzip pth-1.1b4.tar.gz | tar xvf - + $ cd pth-1.1b4 $ ./configure \ --disable-shared \ --enable-pthread \ @@ -46,8 +46,8 @@ $ make test $ cd ROOT/apache-mpm/mpm - $ CFLAGS='-I\$(SRCDIR)/../pth-1.1b3 -DPTHREAD_EVERYWHERE -DNO_SERIALIZED_ACCEPT' \ - LDFLAGS='-L\$(SRCDIR)/../pth-1.1b3/.libs' \ + $ CFLAGS='-I\$(SRCDIR)/../pth-1.1b4 -DPTHREAD_EVERYWHERE -DNO_SERIALIZED_ACCEPT' \ + LDFLAGS='-L\$(SRCDIR)/../pth-1.1b4/.libs' \ LIBS=-lpthread \ ./configure \ --with-layout=GNU \
cvs commit: apache-2.0/mpm/src/modules/mpm/winnt winnt.c
stoddard99/08/13 12:45:27 Modified:mpm/src/modules/mpm/winnt winnt.c Log: Update listener code. Workaround stupid WIN32 bug(?) in WSASocket (fails with 10091 if the process environment block is not fully inherited from the parent). Start working on I/O layering support. It's time to make this thing serve a page. Waiting to check-in iol_file and iol_socket... Revision ChangesPath 1.5 +283 -244 apache-2.0/mpm/src/modules/mpm/winnt/winnt.c Index: winnt.c === RCS file: /home/cvs/apache-2.0/mpm/src/modules/mpm/winnt/winnt.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- winnt.c 1999/08/13 06:58:08 1.4 +++ winnt.c 1999/08/13 19:45:26 1.5 @@ -69,6 +69,7 @@ #include multithread.h #include ../os/win32/getopt.h #include mpm_default.h +#include ../os/win32/iol_socket.h /* * Actual definitions of WINNT MPM specific config globals */ @@ -76,7 +77,6 @@ int ap_daemons_to_start=0; static char *mpm_pid_fname=NULL; static int ap_threads_per_child = 0; -//static int ap_max_threads_per_child = 0; static int workers_may_exit = 0; static int max_requests_per_child = 0; static int requests_this_child; @@ -187,111 +187,9 @@ ap_start_restart(1); } -/* - * Find a listener which is ready for accept(). This advances the - * head_listener global. - */ -static ap_listen_rec *head_listener; -static ap_inline ap_listen_rec *find_ready_listener(fd_set * main_fds) -//static ap_listen_rec *find_ready_listener(fd_set * main_fds) -{ -ap_listen_rec *lr; - -lr = head_listener; -do { - if (FD_ISSET(lr-fd, main_fds)) { - head_listener = lr-next; - return (lr); - } - lr = lr-next; -} while (lr != head_listener); -return NULL; -} -static int setup_listeners(pool *pconf, server_rec *s) -{ -ap_listen_rec *lr; -int num_listeners = 0; - -if (ap_listen_open(pconf, s-port)) { - return 0; -} -for (lr = ap_listeners; lr; lr = lr-next) { -num_listeners++; -} - -/* Should we turn the list into a ring ?*/ -head_listener = ap_listeners; - -return num_listeners; -} - -static int setup_inherited_listeners(pool *p, server_rec *s) -{ -WSAPROTOCOL_INFO WSAProtocolInfo; -HANDLE pipe; -ap_listen_rec *lr; -DWORD BytesRead; -int num_listeners = 0; -int fd; -/* Setup the listeners */ -listenmaxfd = -1; -FD_ZERO(listenfds); -/* Set up a default listener if necessary */ -if (ap_listeners == NULL) { -struct sockaddr_in local_addr; -ap_listen_rec *new; -local_addr.sin_family = AF_INET; -local_addr.sin_addr.s_addr = htonl(INADDR_ANY); - local_addr.sin_port = htons(s-port ? s-port : DEFAULT_HTTP_PORT); -new = malloc(sizeof(ap_listen_rec)); -new-local_addr = local_addr; -new-fd = -1; -new-next = ap_listeners; -ap_listeners = new; -} -/* Open the pipe to the parent process to receive the inherited socket - * data. The sockets have been set to listening in the parent process. - */ -pipe = GetStdHandle(STD_INPUT_HANDLE); -for (lr = ap_listeners; lr; lr = lr-next) { -if (!ReadFile(pipe, WSAProtocolInfo, sizeof(WSAPROTOCOL_INFO), - BytesRead, (LPOVERLAPPED) NULL)) { -ap_log_error(APLOG_MARK, APLOG_WIN32ERROR|APLOG_CRIT, server_conf, - setup_inherited_listeners: Unable to read socket data from parent); -exit(1); -} -fd = WSASocket(FROM_PROTOCOL_INFO, FROM_PROTOCOL_INFO, FROM_PROTOCOL_INFO, - WSAProtocolInfo, 0, 0); -if (fd == INVALID_SOCKET) { -ap_log_error(APLOG_MARK, APLOG_WIN32ERROR|APLOG_CRIT, server_conf, - setup_inherited_listeners: WSASocket failed to get inherit the socket.); -exit(1); -} -if (fd = 0) { -FD_SET(fd, listenfds); -if (fd listenmaxfd) -listenmaxfd = fd; -} -ap_note_cleanups_for_socket(p, fd); -} -CloseHandle(pipe); - - -for (lr = ap_listeners; lr; lr = lr-next) { -num_listeners++; -} - -/* turn the list into a ring ?*/ -//lr-next = ap_listeners; -head_listener = ap_listeners; - -return num_listeners; -} - - /* * Signalling Apache on NT. * @@ -397,7 +295,156 @@ return is_graceful; } +static int s_iInitCount = 0; +static int AMCSocketInitialize(void) +{ +int iVersionRequested; +WSADATA wsaData; +int err; + +if (s_iInitCount 0) { +
cvs commit: apache-2.0/mpm/src/modules/mpm/dexter dexter.c
manoj 99/08/13 12:47:02 Modified:mpm/src/modules/mpm/dexter dexter.c Log: Get rid of the single-child worker thread implementation for now. It's a pain keeping track of them both, and it can be added back easily.. Revision ChangesPath 1.23 +1 -133apache-2.0/mpm/src/modules/mpm/dexter/dexter.c Index: dexter.c === RCS file: /home/cvs/apache-2.0/mpm/src/modules/mpm/dexter/dexter.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -u -r1.22 -r1.23 --- dexter.c 1999/08/13 06:57:46 1.22 +++ dexter.c 1999/08/13 19:47:01 1.23 @@ -893,23 +893,15 @@ } static void *worker_thread(void *); -static void *worker_thread_one_child(void *); /* Starts a thread as long as we're below max_threads */ static int start_thread(void) { pthread_t thread; -void *(*thread_function)(void *); pthread_mutex_lock(worker_thread_count_mutex); if (worker_thread_count max_threads) { -if (num_daemons == 1) { -thread_function = worker_thread_one_child; -} -else { -thread_function = worker_thread; -} -if (pthread_create(thread, worker_thread_attr, thread_function, +if (pthread_create(thread, worker_thread_attr, worker_thread, worker_thread_free_ids[worker_thread_count])) { ap_log_error(APLOG_MARK, APLOG_ALERT, server_conf, pthread_create: unable to create worker thread); @@ -964,130 +956,6 @@ } /* idle_thread_count should be incremented before starting a worker_thread */ - -static void *worker_thread_one_child(void *arg) -{ -struct sockaddr sa_client; -int csd = -1; -pool *tpool;/* Pool for this thread */ -pool *ptrans;/* Pool for per-transaction stuff */ -int sd = -1; -int srv; -int poll_count = 0; -static int curr_pollfd = 0; -size_t len = sizeof(struct sockaddr); -int thread_just_started = 1; -int thread_num = *((int *) arg); -long conn_id = child_num * HARD_THREAD_LIMIT + thread_num; - -pthread_mutex_lock(thread_pool_create_mutex); -tpool = ap_make_sub_pool(thread_pool_parent); -pthread_mutex_unlock(thread_pool_create_mutex); -ptrans = ap_make_sub_pool(tpool); - -while (!workers_may_exit) { -workers_may_exit |= (max_requests_per_child != 0) (requests_this_child = 0); -if (workers_may_exit) break; -if (!thread_just_started) { -pthread_mutex_lock(idle_thread_count_mutex); -if (idle_thread_count max_spare_threads) { -idle_thread_count++; -pthread_mutex_unlock(idle_thread_count_mutex); -} -else { -pthread_mutex_unlock(idle_thread_count_mutex); -break; -} -} -else { -thread_just_started = 0; -} -SAFE_ACCEPT(intra_mutex_on(0)); -while (!workers_may_exit) { -if (poll_count 0) { -/* Just check the pipe_of_death */ -srv = poll(listenfds, 1, 0); -} else { -srv = poll_count = poll(listenfds, num_listenfds + 1, -1); -curr_pollfd = 0; -} -if (srv 0) { -if (errno == EINTR) { -continue; -} - -/* poll() will only return errors in catastrophic - * circumstances. Let's try exiting gracefully, for now. */ -ap_log_error(APLOG_MARK, APLOG_ERR, (const server_rec *) - ap_get_server_conf(), poll: (listen)); -workers_may_exit = 1; -} -if (workers_may_exit) break; - -if (listenfds[0].revents POLLIN) { -/* A process got a signal on the shutdown pipe. Check if - * we're the lucky process to die. */ -check_pipe_of_death(); -continue; -} - -if (num_listenfds == 1) { -sd = ap_listeners-fd; -poll_count = 0; -goto got_fd; -} -else { -/* find a listener. */ -for(;;) { -curr_pollfd++; -/* XXX: Should we check for POLLERR? */ -if (listenfds[curr_pollfd].revents POLLIN) { -poll_count--; -sd = listenfds[curr_pollfd].fd; -goto got_fd; -} -} -} -} -got_fd: -if
cvs commit: apache-2.0/mpm/src/os/unix unixd.c unixd.h
manoj 99/08/13 14:55:19 Modified:mpm/src/modules/mpm/dexter dexter.c mpm/src/modules/mpm/mpmt_pthread mpmt_pthread.c mpm/src/modules/mpm/prefork prefork.c mpm/src/os/unix unixd.c unixd.h Log: Move the ap_sys_siglist code from the Unix MPMs to unixd.[ch] Revision ChangesPath 1.24 +1 -132apache-2.0/mpm/src/modules/mpm/dexter/dexter.c Index: dexter.c === RCS file: /home/cvs/apache-2.0/mpm/src/modules/mpm/dexter/dexter.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -u -r1.23 -r1.24 --- dexter.c 1999/08/13 19:47:01 1.23 +++ dexter.c 1999/08/13 21:49:57 1.24 @@ -424,137 +424,6 @@ return -1; } -#if defined(NSIG) -#define NumSIG NSIG -#elif defined(_NSIG) -#define NumSIG _NSIG -#elif defined(__NSIG) -#define NumSIG __NSIG -#else -#define NumSIG 32 /* for 1998's unixes, this is still a good assumption */ -#endif - -#ifdef SYS_SIGLIST /* platform has sys_siglist[] */ -#define INIT_SIGLIST() /*nothing*/ -#else /* platform has no sys_siglist[], define our own */ -#define SYS_SIGLIST ap_sys_siglist -#define INIT_SIGLIST() siglist_init(); - -const char *ap_sys_siglist[NumSIG]; - -static void siglist_init(void) -{ -int sig; - -ap_sys_siglist[0] = Signal 0; -#ifdef SIGHUP -ap_sys_siglist[SIGHUP] = Hangup; -#endif -#ifdef SIGINT -ap_sys_siglist[SIGINT] = Interrupt; -#endif -#ifdef SIGQUIT -ap_sys_siglist[SIGQUIT] = Quit; -#endif -#ifdef SIGILL -ap_sys_siglist[SIGILL] = Illegal instruction; -#endif -#ifdef SIGTRAP -ap_sys_siglist[SIGTRAP] = Trace/BPT trap; -#endif -#ifdef SIGIOT -ap_sys_siglist[SIGIOT] = IOT instruction; -#endif -#ifdef SIGABRT -ap_sys_siglist[SIGABRT] = Abort; -#endif -#ifdef SIGEMT -ap_sys_siglist[SIGEMT] = Emulator trap; -#endif -#ifdef SIGFPE -ap_sys_siglist[SIGFPE] = Arithmetic exception; -#endif -#ifdef SIGKILL -ap_sys_siglist[SIGKILL] = Killed; -#endif -#ifdef SIGBUS -ap_sys_siglist[SIGBUS] = Bus error; -#endif -#ifdef SIGSEGV -ap_sys_siglist[SIGSEGV] = Segmentation fault; -#endif -#ifdef SIGSYS -ap_sys_siglist[SIGSYS] = Bad system call; -#endif -#ifdef SIGPIPE -ap_sys_siglist[SIGPIPE] = Broken pipe; -#endif -#ifdef SIGALRM -ap_sys_siglist[SIGALRM] = Alarm clock; -#endif -#ifdef SIGTERM -ap_sys_siglist[SIGTERM] = Terminated; -#endif -#ifdef SIGUSR1 -ap_sys_siglist[SIGUSR1] = User defined signal 1; -#endif -#ifdef SIGUSR2 -ap_sys_siglist[SIGUSR2] = User defined signal 2; -#endif -#ifdef SIGCLD -ap_sys_siglist[SIGCLD] = Child status change; -#endif -#ifdef SIGCHLD -ap_sys_siglist[SIGCHLD] = Child status change; -#endif -#ifdef SIGPWR -ap_sys_siglist[SIGPWR] = Power-fail restart; -#endif -#ifdef SIGWINCH -ap_sys_siglist[SIGWINCH] = Window changed; -#endif -#ifdef SIGURG -ap_sys_siglist[SIGURG] = urgent socket condition; -#endif -#ifdef SIGPOLL -ap_sys_siglist[SIGPOLL] = Pollable event occurred; -#endif -#ifdef SIGIO -ap_sys_siglist[SIGIO] = socket I/O possible; -#endif -#ifdef SIGSTOP -ap_sys_siglist[SIGSTOP] = Stopped (signal); -#endif -#ifdef SIGTSTP -ap_sys_siglist[SIGTSTP] = Stopped; -#endif -#ifdef SIGCONT -ap_sys_siglist[SIGCONT] = Continued; -#endif -#ifdef SIGTTIN -ap_sys_siglist[SIGTTIN] = Stopped (tty input); -#endif -#ifdef SIGTTOU -ap_sys_siglist[SIGTTOU] = Stopped (tty output); -#endif -#ifdef SIGVTALRM -ap_sys_siglist[SIGVTALRM] = virtual timer expired; -#endif -#ifdef SIGPROF -ap_sys_siglist[SIGPROF] = profiling timer expired; -#endif -#ifdef SIGXCPU -ap_sys_siglist[SIGXCPU] = exceeded cpu limit; -#endif -#ifdef SIGXFSZ -ap_sys_siglist[SIGXFSZ] = exceeded file size limit; -#endif -for (sig=0; sig sizeof(ap_sys_siglist)/sizeof(ap_sys_siglist[0]); ++sig) -if (ap_sys_siglist[sig] == NULL) -ap_sys_siglist[sig] = ; -} -#endif /* platform has sys_siglist[] */ - /* handle all varieties of core dumping signals */ static void sig_coredump(int sig) { @@ -794,7 +663,7 @@ } } } - + static int setup_listeners(pool *pconf, server_rec *s) { ap_listen_rec *lr; 1.27 +1 -132 apache-2.0/mpm/src/modules/mpm/mpmt_pthread/mpmt_pthread.c Index: mpmt_pthread.c === RCS file: /home/cvs/apache-2.0/mpm/src/modules/mpm/mpmt_pthread/mpmt_pthread.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -u -r1.26 -r1.27 --- mpmt_pthread.c1999/08/13 06:57:52 1.26 +++ mpmt_pthread.c1999/08/13 21:50:55 1.27 @@