many bugs. Instead, it is called where it used to be called. I have
abstracted some of the logic out of the lingering close so that it gets
the socket from the connection using the core's conn_config vector. This
is in anticipation of a change to use a hook for the lingering close,
which I hope to do soon.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91968 13f79535-47bb-0310-9956-ffa450edef68
test in the test suite (except Limit tests). We waste a bit of space
with the listensocks array, which is the exact same as the ap_listeners
list, but we have done that for a while. I'll fix that soon.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91955 13f79535-47bb-0310-9956-ffa450edef68
directives that are used by MPMs. Previous to this patch,
you would use these macros without commans, which was unlike
any other directives. Now, after the macro, you must have
a comma. This makes the macros look more like the rest of the
directives.
I know this is cosmetic, and I was going to leave it alone, but when
I found out that it bothered Cliff too, I decided to fix it after all.
Submitted by: Ryan Bloom and Cliff Woolley
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91896 13f79535-47bb-0310-9956-ffa450edef68
The first step is to remove the socket from the conn_rec,
the server now lives in a context that is passed to the
core's input and output filters. This forces us to be very
careful when adding calls that use the socket directly,
because the socket isn't available in most locations.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91887 13f79535-47bb-0310-9956-ffa450edef68
a cleanup registered with the connection_pool. I have also turned
ap_lingering_close into a static function, because it is only used
in connection.c. This is the next step to consolidating all of the
socket function calls. ap_lingering_close will only be added if the
core is dealing with a standard socket.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91832 13f79535-47bb-0310-9956-ffa450edef68
AP_MPMQ_MAX_REQUESTS_DAEMON macros. Better to do it now rather than later.
**WARNING** This will of course break the compile on any third-party MPMs
you might have floating around, but it's a really quick change to make.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91777 13f79535-47bb-0310-9956-ffa450edef68
very least we should close the socket and write a log message (mostly
to aid debugging, as this is a showstopper problem)
this is no fix; there is a design issue to consider; hopefully this
will
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91089 13f79535-47bb-0310-9956-ffa450edef68
casts would go away before this committed, but alas I didn't say anything.
:-) This gets rid of them and a few others just like them that I also
found in worker.c.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91082 13f79535-47bb-0310-9956-ffa450edef68
state of the worker threads was not being reported back to the
scoreboard, and eventually all the threads running in the children
would be reported as being in the "C -- closing connection" state.
This would wreak havoc on the idle_server_maintenance() routine. Since
these threads would never be counted as idle, the server would
spawn children as fast as possible.
Submitted by: Aaron Bannert <aaron@clove.org>
Reviewed by: Justin Erenkrantz
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91079 13f79535-47bb-0310-9956-ffa450edef68
support it. This defines a symbol called AP_SIG_GRACEFUL in
ap_config_auto.h which will have the appropriate signal value. All
direct references to SIGWINCH have been replaced with AP_SIG_GRACEFUL.
On Linux 2.0, use SIGWINCH instead since SIGUSR1 is used by glibc
2.0's user-space threading library to control threads. All later
versions of Linux/glibc don't have this problem. (Not to mention the
security holes in older Linux versions which make it unsuitable for
use as a web server.) If your platform doesn't have SIGUSR1, use the
appropriate mojo in configure to define what your graceful restart
signal should be.
In theory, a configure switch could be added to allow the admin to
specify the appropriate signal that should be used. This is left
as an exercise to the reader for now.
The docs need to be updated. Since the signal is now configurable,
just saying SIGUSR1 for graceful restart isn't completely true. Also,
the apachectl functionality needs to be moved into httpd - this is
what Win32 does and it makes us consistent across platforms.
Roy issued a veto against use of SIGWINCH by default, so this should
resolve that veto.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91076 13f79535-47bb-0310-9956-ffa450edef68
pools. This incurs less overhead than shuffling the pools
around so that they can be re-used. Remove one of the
queue's condition variables. We just redefined the API to
state that you can't try to add more stuff than you allocated
segments for.
Submitted by: Aaron Bannert <aaron@clove.org>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91075 13f79535-47bb-0310-9956-ffa450edef68
processes to use the accept mutex when starting as root and
using SysV sems for the accept mutex. Previously, this
combination would lead to fatal errors in the child server
processes. perchild can't use SysV sems because of security
issues.
translation: steal apache 1.3 code to call semop(IPC_SET) on
the semaphore to set permissions and uid/gid
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90213 13f79535-47bb-0310-9956-ffa450edef68
MPMs use the same functions for all common MPM directives. This
should make it easier to catch all bugs in these directives once.
Everybody should check their favorite MPM to ensure that it still
compiles, and that these directives work. This is a big patch, and
although it looks good, and things compiled for me, that is no
garauntee that it will work on all platforms. :-)
Submitted by: Cody Sherr <csherr@covalent.net>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90132 13f79535-47bb-0310-9956-ffa450edef68
definately isn't perfect, but we do stop the servers correctly.
The biggest problem right now is that SIGHUP causes the server to
just die.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90065 13f79535-47bb-0310-9956-ffa450edef68
or restarts.
New processes aren't able to start all their threads right away
if other dying processes share the same scoreboard real estate.
So give empty process slots in the scoreboard top priority.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89928 13f79535-47bb-0310-9956-ffa450edef68
on one thread can prevent the process from exiting.
let's rename ap_graceful_restart_signalled to something more appropriate
after the next beta.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89881 13f79535-47bb-0310-9956-ffa450edef68
it is necessary to check for the generation as well as "quiescing", in the
case of a restart where no workers have seen the PoD yet.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89821 13f79535-47bb-0310-9956-ffa450edef68
up with anything better. This is a multiple-worker/single listener MPM.
This MPM is definately not complete, but it is a first step in the
right direction.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89781 13f79535-47bb-0310-9956-ffa450edef68