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
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
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
while) since the current limit is too small for at least one high end site.
Submitted by: Colm MacCarthaigh [colm stdlib.net]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102347 13f79535-47bb-0310-9956-ffa450edef68
* server/mpm/prefork/prefork.c:
(listensocks[]): removed. not required.
(child_main): stop using listensocks[] in favor of an apr_pollset_t. if
there is just one listener, then always refer to that listener's
listen_rec for further processing, otherwise poll and pick up the
listen_rec pointer from the polling structure's client_data. tweaked
the round-robin for the new pollset API (and documented).
cleaning: removed 'offset' which is obviated by the use of a pointer
to a listen_rec. tighten the block-scope of several variables.
switch to use a 'status' variable name rather than three separately
named variables. rename n->numdesc to be more obvious.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101799 13f79535-47bb-0310-9956-ffa450edef68
SECURITY [CAN-2003-0253]: Fixed a bug in prefork MPM causing
temporary denial of service when accept() on a rarely accessed port
returns certain errors. Reported by Saheed Akhtar
<S.Akhtar@talis.com>. [Jeff Trawick]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100517 13f79535-47bb-0310-9956-ffa450edef68
it returns from ap_mpm_run() and allows core Apache code
to run any required cleanups
this resolves problems such as semaphore leaks and
shared memory that isn't cleaned up
(some necessary re-indention to be done in a separate
commit; otherwise, this would be a difficult commit
to review)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99533 13f79535-47bb-0310-9956-ffa450edef68
a note on perchild:
perchild exception handling was busted before this and is still busted
the problem I noticed was that a client that exposes a segfault never
gets its connection dropped and the parent never notices that the
child process that segfaulted hasexited
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99312 13f79535-47bb-0310-9956-ffa450edef68
MaxClients (== ap_daemons_limit) lowered. This leaves junk at the end of
the formerly used part of the scoreboard. If you then decide to raise
MaxClients via graceful, the junk prevents those scoreboard slots from
being used.
This should not impact performance because find_child_by_pid stops its
search when it sees a matching pid. If we don't have a match, something
else is busted.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97287 13f79535-47bb-0310-9956-ffa450edef68
optimal, because it still uses the compatibility functions to make it
work, but it does work. The next step will be to take the memory for
the pollsets under Apache's control.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96005 13f79535-47bb-0310-9956-ffa450edef68
to configure the maximum amount of memory the allocators will
hold on to for reuse. Anything over the MaxMemFree threshold
will be free()d. This directive is usefull when uncommon large
peaks occur in memory usage. It should _not_ be used to mask
defective modules' memory use.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95954 13f79535-47bb-0310-9956-ffa450edef68
certain types of mutexes (particularly SysV semaphores), we
should expect to occasionally fail to obtain or release the
mutex during restart processing.
These mutex failures seem to be a pretty rare occurrence, but
it was fatal.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95665 13f79535-47bb-0310-9956-ffa450edef68
startup message regarding AcceptMutex (what we are using and what
the default is) "fully" match what is present in 1.3.
PR:
Obtained from:
Submitted by:
Reviewed by:
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95568 13f79535-47bb-0310-9956-ffa450edef68
for the Unix MPMs. These have semantics very similar to the
old apachectl commands of the same name.
The use of stderr/stdout and exit status for error conditions
needs to be revisited. For now it matches apachectl behavior.
Justin Erenkrantz got the ball rolling with this feature. Some
of his support code was used unchanged. Other code was shuffled
around and modified or rewritten.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95237 13f79535-47bb-0310-9956-ffa450edef68
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