Brian Havard
d54a593253
Get local address info in listener sockets initialized when constructed in
...
the child process from a descriptor passed from the parent. This fixed vhost
address matching.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94642 13f79535-47bb-0310-9956-ffa450edef68
2002-04-14 08:38:15 +00:00
Brian Havard
d98925fa0d
apr_bucket_alloc_create() now registers a cleanup that does a
...
apr_bucket_alloc_destroy(). Don't double free by calling it explicitly.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94641 13f79535-47bb-0310-9956-ffa450edef68
2002-04-14 06:18:13 +00:00
Brian Pane
a087aacdb9
Fixed a race condition
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94640 13f79535-47bb-0310-9956-ffa450edef68
2002-04-14 00:31:43 +00:00
William A. Rowe Jr
01ba81a1f4
Correct const'ness of argv in all support apps, and use the new
...
apr_app_initialize over apr_initialize for win32, and other platforms
that may wish to tweak 'apr-ized' application support (e.g. Netware?)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94633 13f79535-47bb-0310-9956-ffa450edef68
2002-04-13 19:35:18 +00:00
Sander Striker
6e8efec657
Adapt to the rename of apr_explode_localtime to apr_time_exp_lt in APR.
...
Submitted by: Thom May <thom@planetarytramp.net >
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94631 13f79535-47bb-0310-9956-ffa450edef68
2002-04-13 12:02:38 +00:00
Brian Pane
11c09e84f5
Fixed the shutdown logic
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94630 13f79535-47bb-0310-9956-ffa450edef68
2002-04-13 07:00:32 +00:00
Bradley Nicholes
f317c2c9e6
Readjustment of where the bucket is being allocated now that they are being
...
cleaned up. Need to move the call to after apr_pool_clear() so that it doesn't
get cleanup too soon and never reallocated.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94627 13f79535-47bb-0310-9956-ffa450edef68
2002-04-12 22:11:44 +00:00
Jeff Trawick
162a4d313d
worker MPM: Fix a situation where a child exited without releasing
...
the accept mutex. Depending on the OS and mutex mechanism this
could result in a hang.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94625 13f79535-47bb-0310-9956-ffa450edef68
2002-04-12 19:58:52 +00:00
Brian Pane
33e2f1ce0e
Added in the worker MPM's version of the POD code
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94617 13f79535-47bb-0310-9956-ffa450edef68
2002-04-12 04:25:22 +00:00
Brian Pane
846015fcc2
switch back to the worker's version of the pod code
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94616 13f79535-47bb-0310-9956-ffa450edef68
2002-04-12 04:24:44 +00:00
Brian Pane
200032589f
Added support for MPMs that live in subdirectories under server/mpm
...
like server/mpm/experimental/*
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94615 13f79535-47bb-0310-9956-ffa450edef68
2002-04-12 03:44:49 +00:00
Brian Pane
8643fecac9
Added support for MPMs that live in subdirectories under server/mpm
...
like server/mpm/experimental/*
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94614 13f79535-47bb-0310-9956-ffa450edef68
2002-04-12 03:37:01 +00:00
Brian Pane
d9618f7ff9
fixes to make it compile
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94612 13f79535-47bb-0310-9956-ffa450edef68
2002-04-12 03:07:53 +00:00
Brian Pane
91ad652236
initial check-in of supporting code for leader/follower MPM
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94611 13f79535-47bb-0310-9956-ffa450edef68
2002-04-12 03:06:48 +00:00
Brian Pane
b4bb41d16e
Initial check-in of leader-follower MPM code, derived from worker
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94605 13f79535-47bb-0310-9956-ffa450edef68
2002-04-11 22:33:57 +00:00
Bradley Nicholes
1269b72fbf
Closed up some holes where a thread could escape and exit without releasing
...
the mutex. This would leave all of the other threads deadlocked.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94593 13f79535-47bb-0310-9956-ffa450edef68
2002-04-10 17:13:32 +00:00
Bill Stoddard
698170f9af
The accept loop was sleeping way too long when we ran out of completion contexts.
...
All that is really necessary is that the accept look yield the rest of its time slice
when this condition is hit.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94592 13f79535-47bb-0310-9956-ffa450edef68
2002-04-10 17:02:00 +00:00
Bill Stoddard
90c9abe4ff
Ooops. Don't whack our ptrans pool.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94591 13f79535-47bb-0310-9956-ffa450edef68
2002-04-10 15:17:42 +00:00
Bill Stoddard
f6d114cfda
Move the socket info initialization into the winnt_accept() loop (this more closely
...
follows Apaches socket abstraction design principles). Made similar change to
Win9x code to keep that OS working. Reuse the ptrans pool across transactions.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94590 13f79535-47bb-0310-9956-ffa450edef68
2002-04-10 14:52:38 +00:00
Bill Stoddard
ec72dfe966
Get rid of hungarian notation. No function change.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94589 13f79535-47bb-0310-9956-ffa450edef68
2002-04-10 13:54:55 +00:00
Jeff Trawick
af88e88ef9
get the strchr() declaration
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94578 13f79535-47bb-0310-9956-ffa450edef68
2002-04-09 11:12:10 +00:00
William A. Rowe Jr
0184900aea
Compiler/platform bogosity is apr's job.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94568 13f79535-47bb-0310-9956-ffa450edef68
2002-04-09 07:18:00 +00:00
Aaron Bannert
0a91c63ccc
Remove many unnecessary includes, incl. apr_lock.h
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94567 13f79535-47bb-0310-9956-ffa450edef68
2002-04-09 06:49:18 +00:00
Aaron Bannert
fe3208953d
Remove unnecessary includes of apr_lock.h
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94566 13f79535-47bb-0310-9956-ffa450edef68
2002-04-09 06:48:31 +00:00
Jeff Trawick
724abc113d
Remind the admin about the User and Group directives when we are
...
unable to set permissions on a semaphore.
PR: 7812
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94541 13f79535-47bb-0310-9956-ffa450edef68
2002-04-08 16:57:06 +00:00
Bradley Nicholes
f6aa116eaa
Added a call to apr_bucket_alloc_destroy() to the clean_child_exit() code that
...
is called when each worker thread terminates. This stopped the memory leak.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94479 13f79535-47bb-0310-9956-ffa450edef68
2002-04-06 00:03:32 +00:00
William A. Rowe Jr
e5200732d3
Correct partitioning of filter handles between core and http, and
...
export the handle pointers on Win32.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94468 13f79535-47bb-0310-9956-ffa450edef68
2002-04-05 20:55:00 +00:00
William A. Rowe Jr
95270aa043
One for 2.0.34 - to fix the problem of utf-8 configuration files saved
...
from MeSsed up editors that believe zero byte joiner lead bytes signify
a utf-8 file. Someone point me at an RFC ... gheesh.
FWIW; fixes bugs report 10125
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94446 13f79535-47bb-0310-9956-ffa450edef68
2002-04-05 04:22:45 +00:00
Jeff Trawick
d29493fa5b
quiet a bogus gcc warning that crops up with -O2
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94443 13f79535-47bb-0310-9956-ffa450edef68
2002-04-05 02:23:02 +00:00
Jeff Trawick
3f396cfdbc
implement FOREGROUND for perchild and beos MPMs too
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94442 13f79535-47bb-0310-9956-ffa450edef68
2002-04-05 00:34:22 +00:00
Jeff Trawick
20a1bf6862
worker MPM: add -DFOREGROUND option to use when you want
...
the parent process to run in the foreground
(NO_DETACH is a special mode for running under
programs like daemontools)
the existing flag -DDEBUG turns on FOREGROUND
now instead of NO_DETACH
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94441 13f79535-47bb-0310-9956-ffa450edef68
2002-04-05 00:18:14 +00:00
William A. Rowe Jr
ac512bbbd4
Uhmmm... notices only when we are running as a service [I hate strcmp.]
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94440 13f79535-47bb-0310-9956-ffa450edef68
2002-04-04 23:36:45 +00:00
William A. Rowe Jr
49d4592795
One emit is an error, not a notice. Neither have 'error codes'...
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94439 13f79535-47bb-0310-9956-ffa450edef68
2002-04-04 23:35:11 +00:00
William A. Rowe Jr
a140f23053
Another, potential race. Assure we are allowing worker threads to finish
...
from the time we begin our shutdown exercise.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94438 13f79535-47bb-0310-9956-ffa450edef68
2002-04-04 23:33:44 +00:00
William A. Rowe Jr
7391ec9108
Race condition one ... we were occasionally escaping all the way out to
...
WSATerminate() before this thread picked up it's sleepy head to discover
the world was gone beneath it on 1GHz+ CPU WinXP configurations.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94437 13f79535-47bb-0310-9956-ffa450edef68
2002-04-04 23:32:36 +00:00
Jim Jagielski
cc7157e782
Added support for Posix semaphore-based mutex locking (AcceptMutex posixsem).
...
It's between pthread and sysvsem in the DEFAULT priority ranking. This
makes it the new default for Darwin, and adds support for it for other
platforms as well (like Solaris).
PR:
Obtained from:
Submitted by:
Reviewed by:
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94434 13f79535-47bb-0310-9956-ffa450edef68
2002-04-04 18:36:03 +00:00
Sander Striker
d14107e925
Remove hardcoded paths from MPMs and move them to a more central
...
place. Expand paths in httpd-std.conf in a similar fashion as we do
in our headers.
Submitted by: Pier Fumagalli <pier@betaversion.org >
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94431 13f79535-47bb-0310-9956-ffa450edef68
2002-04-04 09:15:44 +00:00
Aaron Bannert
36a1c908fb
Fix a potential size mismatch (apr_off_t might be 64bits on some platforms).
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94430 13f79535-47bb-0310-9956-ffa450edef68
2002-04-04 06:39:22 +00:00
Jeff Trawick
8551f53a5b
worker MPM:
...
Don't create a listener thread until we have a worker thread. Otherwise,
in situations where we'll have to wait a while to take over scoreboard
slots from a previous generation, we'll be accepting connections we can't
process yet.
Don't let the listener thread clobber the scoreboard entry of the first
worker thread.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94420 13f79535-47bb-0310-9956-ffa450edef68
2002-04-03 15:47:59 +00:00
Jeff Trawick
7343783f29
prefork MPM: add -DFOREGROUND option to use when you want
...
the parent process to run in the foreground
(NO_DETACH is a special mode for running under
programs like daemontools)
the existing flag -DDEBUG turns on FOREGROUND
now instead of NO_DETACH
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94419 13f79535-47bb-0310-9956-ffa450edef68
2002-04-03 13:45:57 +00:00
Jeff Trawick
be702836d1
style change only
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94418 13f79535-47bb-0310-9956-ffa450edef68
2002-04-03 13:38:06 +00:00
Jeff Trawick
cdb0212dd2
Allow worker MPM to build on systems without pthread_kill().
...
Submitted by: Pier Fumagalli (and mangled by Jeff)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94417 13f79535-47bb-0310-9956-ffa450edef68
2002-04-03 13:10:56 +00:00
Bradley Nicholes
7c0bb25bd2
Check for a NULL pointer in the case of the OS address space
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94388 13f79535-47bb-0310-9956-ffa450edef68
2002-04-02 16:25:23 +00:00
Bill Stoddard
7d94a82bc2
Win32: tweak some messages
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94387 13f79535-47bb-0310-9956-ffa450edef68
2002-04-02 14:48:54 +00:00
Bill Stoddard
31db5ad666
Win32: Change startup/shutdown message class to NOTICE. These messages should always
...
be written to the error log regardless of the loglevel.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94386 13f79535-47bb-0310-9956-ffa450edef68
2002-04-02 14:42:06 +00:00
Bradley Nicholes
dc2e5a5b3e
Replaced a hack for getting the address space with the real API
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94369 13f79535-47bb-0310-9956-ffa450edef68
2002-04-02 00:29:23 +00:00
Bill Stoddard
c7853dd902
Win32: Move apr_bucket_alloc() to a more reasonable location to fix memory leak.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94362 13f79535-47bb-0310-9956-ffa450edef68
2002-04-01 18:55:46 +00:00
Brian Havard
40f49588c2
Destroy the connection pool (and therefore run the cleanups) before destroying
...
the bucket_alloc as the cleanups refer to buckets allocated by the
bucket_alloc.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94360 13f79535-47bb-0310-9956-ffa450edef68
2002-04-01 16:42:02 +00:00
Jeff Trawick
3010b21372
Don't allow initialization to succeed if we can't get a socket
...
corresponding to one of the Listen statements.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94358 13f79535-47bb-0310-9956-ffa450edef68
2002-04-01 12:53:09 +00:00
Ryan Bloom
ad5321facb
Migrate perchild to the new lock API, and clean up some of the logic
...
surrounding the FD passing. This doesn't work yet, but it is getting
closer. Currently, the problem is that we don't correctly read the data
from the socket so that it can be passed to the correct child.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94357 13f79535-47bb-0310-9956-ffa450edef68
2002-04-01 08:27:42 +00:00