This eliminates the descriptor copying and mutex operations, and
O(n)-time apr_pollset_remove() loop when used with an apr_pollset
implementation that support the no-copy optimization.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/async-dev@327757 13f79535-47bb-0310-9956-ffa450edef68
the httpd core) is responsible for write completion.
Note that, with this commit, the Event MPM is still doing write
completion synchronously. I'll add async write completion as a
separate commit.
Note also that this commit breaks the (experimental) Leader/Followers
MPM on the (equally experimental) async-dev branch. The fix is to add
either synchronous or asynchronous write completion to that MPM. Rather
than hack in synchronous write completion, I'll revisit Leader/Followers
once I have async working in Event.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/async-dev@307362 13f79535-47bb-0310-9956-ffa450edef68
- A new End-Of-Request bucket is pushed through the output filter
chain after the last bucket of the response.
- This bucket gets destroyed by ap_core_output_filter() after the
buckets in front of it have been sent.
- The destroy callback of the EOR bucket invokes the access logger
and frees the request's pool.
With this change, the request logger now runs after the last byte of
the response is _sent_, rather than after the last byte of the response
is _generated_. This should make the bytes-sent count in the access
log more accurate in cases where the client closes the connection
midway through the sending of the response.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/async-dev@307339 13f79535-47bb-0310-9956-ffa450edef68
The big change is that it now does nonblocking writes when possible. The
goal of this redesign is to more cleanly support asynchronous write completion
in MPMs such as Event or Leader. However, the nonblocking writes may also
help in Worker and Prefork by allowing more overlapping of handler and
output filter processing with network writes.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/async-dev@291377 13f79535-47bb-0310-9956-ffa450edef68
interact with the async R&D, but I'm merging it into the async-dev branch
because there's now a test case specifically for this change in
httpd-test/perl-framework.)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/async-dev@291354 13f79535-47bb-0310-9956-ffa450edef68
a function I think, especially with the fact that
the mapping of getpid() to APR_PID_T_FMT isn't
consistant in some areas.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@265506 13f79535-47bb-0310-9956-ffa450edef68
ask each child process to do the same. We then monitor until all children have
exited.
The change to ap_start_shutdown(void) to ap_start_shutdown(int) may look like
an external API change, but the function is defined static, and used only in
one place.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@241819 13f79535-47bb-0310-9956-ffa450edef68
replace with the new ap_relieve_child_processes() call. Add a sleep() call now,
as we lost the timeout inherent in ap_wait_or_timeout(). 1 second seems a sane
choice.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@240466 13f79535-47bb-0310-9956-ffa450edef68
ap_reclaim_child_processes(). Allows us to waitpid() each process in the
scoreboard and each "extra" process with a single call.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@240465 13f79535-47bb-0310-9956-ffa450edef68
first).
General approach is to send SIGUSR1 to all children (which will de-listen, and
exit when finished), and to gather all children as they exit.
We don't use a sleep(timeout) for the timeout implementation, because this
would lead to a rut of defunct children until the timeout had expired.
set_graceful_shutdown stolen from Ken Coar. See <3E84B1EC.3050007@Golux.Com>
(28 Mar 2003).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@240270 13f79535-47bb-0310-9956-ffa450edef68
change;
1.) httpd -k graceful sends SIGUSR1 to the parent pid, which in turn
sends SIGUSR1 to all of the active children,
2.) Active children each close their copy of listener fd's.
This means that the listening sockets are freed for re-use. In the ordinary
case, this makes no difference. However if for example admin changes "Listen
80" to "Listen 81" in the config, this rev makes port 80 immediately available
(no waiting for the graceful children to die).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@239711 13f79535-47bb-0310-9956-ffa450edef68
* This is useful for properly implementing a graceful stop and restart
where we want child processess to be able to carry on serving a request
but "de-listen" from a port. So that another instance entirely can be
started in our place, or to unbind from a "Listen" directive an admin
has removed from the configuration.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@239710 13f79535-47bb-0310-9956-ffa450edef68
than an assert() for errors which plague users on Solaris boxes which
don't have a properly configured resolver.
PR: 27525
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@230453 13f79535-47bb-0310-9956-ffa450edef68