Commit Graph

91 Commits

Author SHA1 Message Date
b1223a54ae Fix warnings from the local/remote_addr stuff properly.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84036 13f79535-47bb-0310-9956-ffa450edef68
1999-10-26 06:05:38 +00:00
cd45909aa5 Fix warnings, and fix a segfault in the process.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84034 13f79535-47bb-0310-9956-ffa450edef68
1999-10-25 23:16:29 +00:00
df37d04f04 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84031 13f79535-47bb-0310-9956-ffa450edef68
1999-10-24 13:08:30 +00:00
482dcf3495 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!


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84007 13f79535-47bb-0310-9956-ffa450edef68
1999-10-20 12:50:12 +00:00
644262a3ac 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83956 13f79535-47bb-0310-9956-ffa450edef68
1999-10-10 20:35:06 +00:00
953b1973c7 Attempt to port mpmt_pthreads to APR, but threads seem to be broken on my plaform
so it is only partially tested.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83955 13f79535-47bb-0310-9956-ffa450edef68
1999-10-10 17:08:07 +00:00
cd06de1ce3 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83943 13f79535-47bb-0310-9956-ffa450edef68
1999-10-07 20:48:26 +00:00
2b361ec557 First patch to re-order function parameters. This one gets the low hanging
fruit, and moves most of the result parameters to the first argument.
Future patches in this series will move the rest of the result parameters
to the beginning of the list, and will move the context's to the end of the
list


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83927 13f79535-47bb-0310-9956-ffa450edef68
1999-10-04 16:38:16 +00:00
bf339f0c02 Instead of blocking all signals in child_main, we were unblocking them;
this fixes that. Reported by Dave Colasurdo <davecola@us.ibm.com>.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83904 13f79535-47bb-0310-9956-ffa450edef68
1999-09-17 23:32:11 +00:00
e4e32bb59e A change to how APR uses user data. Now, user data is a linked list that
is retreivable using a char string.  Basically, you provide a string that
will be used as a key when you store the data.  If the key was used before,
we will overwrite the old data.  When you want to retreive your data, pass
in the same key, and we will find the data you care about.  This also makes
it harder to put user data in when creating a context, so that option has
disappeared.  It is also impossible to inherit user data from parent contexts.
This option may be added in later.  I will be documenting this VERY soon.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83901 13f79535-47bb-0310-9956-ffa450edef68
1999-09-14 13:37:45 +00:00
69adf379b4 Remove all of the calls to functions like "ap_popenf". These functions were
moved down to APR, but they are being removed.  They are not portable, and
were only moved down for backwards compatability.  With this change, they can
be safely removed, which is the next commit on it's way.
Submitted by:  Ryan Bloom and Paul Reder


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83879 13f79535-47bb-0310-9956-ffa450edef68
1999-09-08 14:15:55 +00:00
c37f14ddf3 Changed pools to contexts. Tested with prefork and pthread mpm's. I'll
check this out tomorrow and make sure everything was checked in correctly.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83852 13f79535-47bb-0310-9956-ffa450edef68
1999-08-31 05:35:52 +00:00
d069a6ea00 Move the code to force Expat linking into common code.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83713 13f79535-47bb-0310-9956-ffa450edef68
1999-08-17 22:05:17 +00:00
335b6ab2fc Unbreak dexter and pthread MPM after Ben's latest hook changes.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83686 13f79535-47bb-0310-9956-ffa450edef68
1999-08-15 11:02:44 +00:00
89338891e0 Move the ap_sys_siglist code from the Unix MPMs to unixd.[ch]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83669 13f79535-47bb-0310-9956-ffa450edef68
1999-08-13 21:54:06 +00:00
2ab2189444 Add a connection ID to conn_rec. It uniquely identifies a connection at
any instant in time. It's not very well tested yet.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83662 13f79535-47bb-0310-9956-ffa450edef68
1999-08-13 06:58:08 +00:00
33a1a51429 Move a little code around to shorten the worker_thread function a bit.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83646 13f79535-47bb-0310-9956-ffa450edef68
1999-08-11 23:55:42 +00:00
a21012b7aa Put back the process_child_status code from 1.3. Handling of synchronous
signals like SEGV and FPE is still a bit dodgy, though, so this won't
accomplish much by itself.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83644 13f79535-47bb-0310-9956-ffa450edef68
1999-08-10 21:18:43 +00:00
2bc99dc33d Take child_num and thread_num out of conn_rec. They aren't used anywhere
anymore, and conn_rec is the wrong place for them.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83581 13f79535-47bb-0310-9956-ffa450edef68
1999-08-05 19:56:24 +00:00
65e96b4126 Undo the stupid pipe of death changes I made earlier today. dean noted
that we need an char_of_death array to do this safely, and it's just not
worth the effort. The EINTR stuff is left behind, though. Hopefully this
is now decent again.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83566 13f79535-47bb-0310-9956-ffa450edef68
1999-08-04 00:21:35 +00:00
b59f5ccb64 Fix a couple of potential graceful restart bugs noted by Dean: EINTR was
never dealt with in the code to write to the pipe of death, and in
pathological cases where the number of processes is greater than
PIPE_BUF, we could end up only killing some processes.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83563 13f79535-47bb-0310-9956-ffa450edef68
1999-08-03 23:36:43 +00:00
07c55ef047 No reason to have a loop writing one byte at a time to the pipe of death
when the write call will do it for us. Also fix the comments a bit.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83562 13f79535-47bb-0310-9956-ffa450edef68
1999-08-03 20:41:37 +00:00
1ff7ed7b56 get rid of the vestigial ap_open_logs call (and the ap_clear_pool that
went along with it), to fix logging problems. Sometimes the bug would
show up as a segfault, and sometimes as logging to an incorrect file.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83561 13f79535-47bb-0310-9956-ffa450edef68
1999-08-03 20:03:09 +00:00
779cf1c05e Update with new hooks.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83559 13f79535-47bb-0310-9956-ffa450edef68
1999-08-03 18:17:51 +00:00
42fbf6064f Support non-threaded operation, for the most part. The code still
references pthread calls, but they are essentially no-ops in the
non-threaded case; these can be #defined or wrapped away.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83530 13f79535-47bb-0310-9956-ffa450edef68
1999-07-29 20:43:28 +00:00
a098e1a034 Use Ben Hyde's warning fix on two other MPMs.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83529 13f79535-47bb-0310-9956-ffa450edef68
1999-07-29 20:06:20 +00:00
42b4d0df2b Replace Min/MaxSpareServers with Min/MaxSpareThreads. This allows the
admin to specify with finer granularity how the server pool should be
run.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83522 13f79535-47bb-0310-9956-ffa450edef68
1999-07-28 22:35:42 +00:00
5fd6c036d6 Update with latest hook additions.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83517 13f79535-47bb-0310-9956-ffa450edef68
1999-07-27 23:54:24 +00:00
5dfa1ce145 - get rid of pre_command_line_hook ... use register_hooks for this purpose
- get rid of optreset... screw -D, use environment variables ONE_PROCESS,
  SHOW_HOOKS, DUMP_VHOSTS, ... at least it builds this way :)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83512 13f79535-47bb-0310-9956-ffa450edef68
1999-07-27 12:05:08 +00:00
59357ccb29 Update for newest hooks
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83504 13f79535-47bb-0310-9956-ffa450edef68
1999-07-26 03:28:15 +00:00
83921a9e40 Fix silly bug. accept() has to be inside the accept mutexed block. doh.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83481 13f79535-47bb-0310-9956-ffa450edef68
1999-07-21 22:32:36 +00:00
b34f885b49 Sync module strucuture with the prefork MPM again.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83463 13f79535-47bb-0310-9956-ffa450edef68
1999-07-18 21:37:31 +00:00
9014097343 Be careful, accept_mutex_child_init() has to be done _before_
unixd_setup_child() switches the process UID, because else under platforms
where the mutex is flock() based this fails...


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83461 13f79535-47bb-0310-9956-ffa450edef68
1999-07-16 10:27:03 +00:00
ec76d5d95e Use new module structure
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83460 13f79535-47bb-0310-9956-ffa450edef68
1999-07-16 07:15:48 +00:00
633042818e poll+accept without accept serialziation is dangerous, so for the
moment, keep serialization on all the time and get rid of the attempts
to make its usage thread-safe.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83458 13f79535-47bb-0310-9956-ffa450edef68
1999-07-16 00:24:04 +00:00
640209db97 Get rid of the accept abstraction, which seems out-of-place in the MPM
codebase, and make the poll-accept model the only model supported. Also,
some code was cleaned up and rewritten in the process.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83446 13f79535-47bb-0310-9956-ffa450edef68
1999-07-09 20:40:23 +00:00
9e723aea14 Prevent pthread.h from showing up in the Makefile dependancies when we
rerun "make depend"


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83445 13f79535-47bb-0310-9956-ffa450edef68
1999-07-09 20:30:15 +00:00
944b313499 Update to new module layout (Hooks)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83439 13f79535-47bb-0310-9956-ffa450edef68
1999-07-07 15:16:43 +00:00
327369045d Use ap_new_connection in pthread MPM. This required adding an argument
to ap_new_connection for now: thread_num.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83422 13f79535-47bb-0310-9956-ffa450edef68
1999-07-02 18:22:27 +00:00
db15def934 Updated the pthread MPM to work with the rest of the code
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83390 13f79535-47bb-0310-9956-ffa450edef68
1999-06-27 03:45:15 +00:00
b75c7339bd Consistant and shorter naming
of MPM methods implemented.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83372 13f79535-47bb-0310-9956-ffa450edef68
1999-06-24 01:57:58 +00:00