Add an allocator-passing mechanism throughout the bucket brigades API.
From Apache's standpoint, the apr_bucket_alloc_t* used throughout a given
connection is stored in the conn_rec by the create_connection hook. That
means it's the MPM's job to optimize recycling of apr_bucket_alloc_t's --
the MPM must ensure that no two threads can ever use the same one at the
same time, for instance.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94304 13f79535-47bb-0310-9956-ffa450edef68
when the .conf file is missing or horribly corrupt. Move those actions
into the rewrite args phase so we don't trip over a missing .conf file,
we couldn't care less if we are stopping/uninstalling Apache.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94189 13f79535-47bb-0310-9956-ffa450edef68
to the service_init completion, expanded timeouts, moved SERVICE_STOPPED
message posting to the main thread since sometimes, in odd cirumstances,
our SCM thread wasn't resumed prior to termination, and ripped the code
for the stderr logs to use nt_eventlog.c instead. And generally tried
to make the code just a little bit more grokable [as if such a thing
is really possible.]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93928 13f79535-47bb-0310-9956-ffa450edef68
can no longer hang on to the listeners after it checks that they are
free. Also, we cannot be checking listeners if we are using -k "config"
to alter the service config, since the service might be running as we
try this, and we cannot check the listeners in -k "restart", since we
are pretty certain they are owned by the running service we are about
to try restarting..
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93926 13f79535-47bb-0310-9956-ffa450edef68
let's start dropping some to debug until we have the essentials of
parent -> create child -> child running -> parent shutting down
-> child exiting -> child quit -> parent exited at APLOG_INFO level.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93516 13f79535-47bb-0310-9956-ffa450edef68
somewhat hard to tell, seeing as we never log any status until we can't
obtain the mutex. Lots more rv checking is required in here, would
appreciate if new/touched code grew the appropriate tests.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93515 13f79535-47bb-0310-9956-ffa450edef68
on Win32 when using the clib; msvcrt has its own initialization and
destruction, so it needs its own turn. _createthreadex is the same but
different - it's implemented by msvcrt and causes all the appropriate
setup and teardown to occur.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93385 13f79535-47bb-0310-9956-ffa450edef68
obscure and difficult to trace. This should do away with the handle
corruption we experienced. If anyone cares to walk the crt (source
is installed in vc\src\crt if you install it w/ Visual C++/Studio)
it's worth understanding why this occured.
This patch
1. creates the pipe non-inherited, and dups the write end
for inheritence with limited permissions.
2. sets the STD_ERROR_HANDLE _after_ we fixup the FILE *stderr and fd 2.
3. Splits the signal_monitor event in two, service_init/service_term
for clarity and correctness.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93374 13f79535-47bb-0310-9956-ffa450edef68
we failed to create the child. Cleans up CloseHandle() destruction to
match all created handles - and postpone populating the *child_exit_event
until we succeed.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93369 13f79535-47bb-0310-9956-ffa450edef68
be longlived malloced regions, or sit upon the stack. No need to mess
with pool conflicts.
The remaining pool accesses are still a problem to resolve.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93327 13f79535-47bb-0310-9956-ffa450edef68
only in the service-mode. SetServiceDescription was borked, now fixed.
Since we don't use the posix/libc style stderr, I've also pitched that
code, which was causing an exception.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93326 13f79535-47bb-0310-9956-ffa450edef68
take us to the module struct, and working backwards, the register hooks
and then top-level init stuff. At least that's how any other Apache
module is authored.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93306 13f79535-47bb-0310-9956-ffa450edef68
GENERIC_READ|GENERIC_WRITE to the scoreboard mapping,
EVENT_MODIFY_STATE|SYNCHRONIZE to it's exit event,
and fix a _major_ bug in the NullACL code that set the length
by the size of the pointer-to-acl, rather than the size of an acl.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93300 13f79535-47bb-0310-9956-ffa450edef68
1. The only good assert is a deleted assert.
2. The child exit event is a very private item, can't pollute into
other processes we create, shouldn't be named, and should never
be accessable to anyone but the parent.
3. We now pass 'handles', not just a single scoreboard.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93278 13f79535-47bb-0310-9956-ffa450edef68
to keep an eye on those kids.)
2. gotta return a respectable exit code.
3. gotta have a few sensible messages.
4. gotta know where we went.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93276 13f79535-47bb-0310-9956-ffa450edef68
had begun; we need to start organizing this so it can be groked by
more than one person at a time [or simply by more than one person.]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93275 13f79535-47bb-0310-9956-ffa450edef68
has a STDERR channel in the first place, so the first ap_open_stderr_log()
fails. We need to open it after we've initialized the service control
manager and created the stderr pipe thread that logs stderr output over
in our Application Event Log.
The failure message still looks pretty danged stupid on WinXP however;
"The Apache2 service on Local Computer started and then stopped."
[ok, that part is straightforward.] "Some services stop automatically
if they have no work to do, for example, the Performance Logs and
Alerts service." [that's the bogus bit.]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93241 13f79535-47bb-0310-9956-ffa450edef68
The child processes use the child_init phase to reattach to the shared
memory. This makes Windows work like Unix, which should make it easier
for module authors to write portable modules.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93119 13f79535-47bb-0310-9956-ffa450edef68
client_socket from the conn_rec. Diffs from Ryan's patch include:
- rename the create_connection hook to install_transport_filters
- move the point of invocation of the hook till after the call to
after ap_update_vhost_given_ip to enable the hook to use vhost
config info in its decision making.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93087 13f79535-47bb-0310-9956-ffa450edef68