Fix a couple of pool-related bugs that may or may not be causing actual
problems. This makes sure that all interactions with the
thread_pool_parent are mutexed, and makes ap_put_os_sock use the correct
pool in worker_thread().
David Reid [Thu, 28 Oct 1999 22:14:54 +0000 (22:14 +0000)]
This gets the BeOS mpm working again. I'm still using the poll provided
by RSE as so far the APR poll hasn't delivered enough performance. I'll
fix it once I've got some other problems out of the way.
Martin Kraemer [Wed, 27 Oct 1999 22:36:20 +0000 (22:36 +0000)]
Add CVS Revision number to ab.c to allow for detecting changes
which were not marked by a version number update. Additionally,
display base repository name (apache-2.0)
Also, merge revision 1.34 of the 1.3 branch:
Made sure ApacheBench (ab) performs no more requests than
specified on command line (option -n).
Submitted by: Jim Cox <jc@superlink.net>
Reviewed by: Ralf S. Engelschall
PR: 4839
Brian Havard [Sun, 24 Oct 1999 13:08:30 +0000 (13:08 +0000)]
Add a context parameter to ap_accept() for the connection socket to be
allocated from. This is needed because the lifetime of a connection is
ususally much shorter than that of the listen socket. Only tested on
OS/2.
Martin Kraemer [Fri, 22 Oct 1999 16:01:27 +0000 (16:01 +0000)]
I am not claiming that the modules work now, but at least the parameter lists
are prepared for the updated ap_log_rerror() format. BTW: What is APLOG_NOERROR
for now that we have an explicit error code? This is still WIP!
Martin Kraemer [Fri, 22 Oct 1999 15:50:12 +0000 (15:50 +0000)]
**WARNING** DO NOT USE YET - interim state
This module now compiles, but it appears to loop. I'm currently on the
Systems'99 trade fair and will continue work on the module after returning
home.
Pool types have been adapted to ap_context_t; ap_popendir() has been
replaced by the new ap_opendir() APR function.
Bill Stoddard [Thu, 21 Oct 1999 18:28:14 +0000 (18:28 +0000)]
This patch fixes EBCDIC conversion for Apache 1.3.9 on platforms that
support mmap. Currently, ap_checkconv() is called only if mmap is not
supported, or if mmap fails. This results in mangled .gif's and .jpg's
etc. because EBCDIC-ASCII conversion is done by default when
CHARSET_EBCDIC is defined.
Note: I suspect all this will radically change when EBCDIC support is
done in an IOL. However, I think it is valuable to put this patch into
Apache 2.0 as a reminder since it is just a code move rather than new code.
Submitted by: Greg Ames
Reviewed by: Bill Stoddard
Ryan Bloom [Wed, 20 Oct 1999 18:28:04 +0000 (18:28 +0000)]
Fix mod_cgi so it works on Unix systems. We need to be VERY careful
about calling ap_cleanups_for_exec now. There is really no reason to call
this from outside of APR, unless you are specifically doing a fork/exec.
If you use ap_create_process, it will call ap_cleanups_for_exec for you
in the right spot now. Also cleaned up some of the code because it helped
with debugging. We need better error messages in mod_cgi now.
iCVS:
Ryan Bloom [Wed, 20 Oct 1999 12:50:12 +0000 (12:50 +0000)]
Add a status value to ap_log_error and ap_log_rerror. This allows us to use
apr_status codes in our error logs. The main advantage of this, is portable
error codes. Now, Windows will finally be able to use errno!
Ryan Bloom [Thu, 14 Oct 1999 14:36:49 +0000 (14:36 +0000)]
I missed one function when swapping paramters. This fixes it. I think I
have caught them all this time. I really hope this is the final time I have
to swap parameters.
Add a config directive to Dexter to not maintain any connection status,
similarly to what ExtendedStatus did in 1.3. It's not perfect, since
the server might still go through effort to derive status info only to
have it not recorded, but it does go most of the way.
My connection status patch broke all the MPMs that didn't have
connection status support yet. For now, throw in stub functions so that
the server compiles.
Add a connection status table to replace the old function of the
scoreboard. It allows MPMs to implement their own mechanism for the
status table and allows any module to add its own per-connection status
entries.
Bill Stoddard [Tue, 12 Oct 1999 19:19:29 +0000 (19:19 +0000)]
Need to pass in just the directory, not including the filename. Note that CGI
arguments are being completely ignored. suexec needs to be handled, the CGI arguments
need to be canonicalized (e.g., quote args containing spaces, etc.) and ScriptInterpreterSource
needs reimplementing. Whew!
Martin Kraemer [Mon, 11 Oct 1999 22:40:18 +0000 (22:40 +0000)]
Remove most of the annoying "re ap_context_t mplement" mis-replacements
by what I think is their real meaning. Guys, I didn't verify all of this,
please have a close look at my "fixes". Thanks.
Bill Stoddard [Mon, 11 Oct 1999 20:44:28 +0000 (20:44 +0000)]
First cut at migrating mod_cgi over to APR. Still needs some work to make it Win32 friendly (use named pipes, etc.)
Submitted by: Paul Reder
Reviewed by: Bill Stoddard
David Reid [Mon, 11 Oct 1999 20:25:08 +0000 (20:25 +0000)]
These changes allow the support programs to compile on BeOS.
The biggest change is in ab.c where the functions that BeOS needs that
aren't the standard format are hidden behind a new ab_* define. Tested
on FreeBSD and BeOS.
Ryan Bloom [Mon, 11 Oct 1999 17:52:28 +0000 (17:52 +0000)]
This finishes the argument swaps. The docs haven't been updated, and
probably won't be for a while yet. These argument orders have been
documented in the APR Design doc committed earlier today.
Bill Stoddard [Mon, 11 Oct 1999 17:33:24 +0000 (17:33 +0000)]
Apply Ben H's patch to the winnt mpm...
Well this was thought provoking.
Drive out the use of malloc in two places.
In listen.c, using the global process pool instead. That changes the
API into listen so that a process is passed in rather than the config
pool. That's all was easy.
The pain is propogating a change into all N of the mpm, they
are all similar but different in their use of listen.c There
is a lot to dislike about similar but code scattered code.
I changed the N setup_listener routines, they now take only
the server since they can dig the config and global pool
out of there.
Free today: ap_setup_prelinked_modules now takes the process so it
can allocate it's table in the process's pool rathern than use
malloc.
Ryan Bloom [Mon, 11 Oct 1999 14:20:48 +0000 (14:20 +0000)]
Make Apache use the new ap_create_process call. This is the first of a
group of patches. This patch, allows the core server to compile and
serve pages. There is a set of patches which will follow to allow the
standard modules to use ap_create_process. This change should make
writing code which spawns new processes easy to read and understand.
Submitted by: Paul Reder
Ryan Bloom [Sun, 10 Oct 1999 20:35:06 +0000 (20:35 +0000)]
Bring network code to the parameter order spec. This means contexts go last,
and result parameters go first. Also fixed a small bug in the Makefile. We
should be removing the libs dir when we do a distclean, we are now.
David Reid [Sat, 9 Oct 1999 20:27:25 +0000 (20:27 +0000)]
Incorporate Ben's changes to ap_listen_open in the beos mpm. Also used
the opportunity to make the setup_listeners routine the same as the other
mpm's. If we're all doing it the same should it be in an mpm at all?
David Reid [Fri, 8 Oct 1999 19:02:36 +0000 (19:02 +0000)]
Well here is the first attempt at an mpm for BeOS. It's based
on the mpmt_pthread module but is totally threaded as that what
BeOS needs. There's a lot that can be improved but now that it's
committed others can start looking and helping.
Ben Hyde [Thu, 7 Oct 1999 20:48:26 +0000 (20:48 +0000)]
Well this was thought provoking.
Drive out the use of malloc in two places.
In listen.c, using the global process pool instead. That changes the
API into listen so that a process is passed in rather than the config
pool. That's all was easy.
The pain is propogating a change into all N of the mpm, they
are all similar but different in their use of listen.c There
is a lot to dislike about similar but code scattered code.
I changed the N setup_listener routines, they now take only
the server since they can dig the config and global pool
out of there.
Free today: ap_setup_prelinked_modules now takes the process so it
can allocate it's table in the process's pool rathern than use
malloc.
Ben Hyde [Thu, 7 Oct 1999 18:13:17 +0000 (18:13 +0000)]
Add process_rec to the top of {server,connection,request}_rec
hierarchy of structs that abstract server activities. Store some
stuff in process_rec (finally a place to have nearly guiltless
globals) for example the global and configuration pools. Put some
operations on process_rec in http_main, in particular the
destroy_and_exit operation, and the use it to do all the exit calls.
Change ap_read_config to operation on this "object" rather than on the
configuration pool. Modify server_rec to point to the process, so you
can get at it most all the time which should finally allow most of the
server's malloc calls to be eliminated.
There are no locks in the process struct as yet, put them in as needed.
Some of the hooks should take this rather than conf. pool.
Ben Hyde [Thu, 7 Oct 1999 14:32:06 +0000 (14:32 +0000)]
Man! This file vastly improved. Thanks Dean!
Use the abstraction API_EXPORT_NONSTD for exporting main (aka
apache_main). Use clear rather than destroy on ptemp as other
'systolic' pools do. That also fixing a leak of the first ptemp
created. Let the destroy of pglobal to all the cleanup. Meanwhile,
all exit paths should destroy pglobal so the cleanup/unwind gets run
and this routine sets a bad example by having many exits that don't -
another day.
PR:
Obtained from:
Submitted by:
Reviewed by:
Ryan Bloom [Wed, 6 Oct 1999 23:04:16 +0000 (23:04 +0000)]
Bring file_io up to the new parameter order for APR. I have decided to do
these on a directory by directory basis for the rest of APR. I hope to
cause fewer problems for other developers by doing it this way.