1
0
mirror of https://github.com/apache/httpd.git synced 2026-10-25 10:59:28 +03:00
Commit Graph

331 Commits

Author SHA1 Message Date
Jim Jagielski
5061d9fa92 No functional Change: Removing trailing whitespace. This also
means that "blank" lines consisting of just spaces or
tabs are now really blank lines


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332306 13f79535-47bb-0310-9956-ffa450edef68
2005-11-10 15:11:44 +00:00
Colm MacCarthaigh
e92e109916 Remove some trailing spaces. Syncs with 2.2.x.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@293307 13f79535-47bb-0310-9956-ffa450edef68
2005-10-03 11:09:15 +00:00
Joe Orton
0fb1643049 * server/mpm/prefork/prefork.c: Add volatile qualifier to die_now
since it is changed by a signal handler.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@290124 13f79535-47bb-0310-9956-ffa450edef68
2005-09-19 11:54:52 +00:00
Colm MacCarthaigh
cc841a28e5 Initiliase all of the first_*_limit variables to zero, so that we can actually
raise limits beyond their defaults reliably. 



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@265523 13f79535-47bb-0310-9956-ffa450edef68
2005-08-31 16:10:55 +00:00
Jim Jagielski
d81de0d9b3 Add ap_append_pid(); This is performed enough to warrant
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
2005-08-31 15:22:08 +00:00
Colm MacCarthaigh
5a0531c52e Move the "GracefulShutdownTimeout" command definition into mpm_common
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@264103 13f79535-47bb-0310-9956-ffa450edef68
2005-08-29 09:28:27 +00:00
Ian Holsman
8c1e315d3f Doxygen fixup / cleanup
submited by: Neale Ranns neale ranns.org
reviewed by: Ian Holsman



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@263931 13f79535-47bb-0310-9956-ffa450edef68
2005-08-28 23:03:59 +00:00
Colm MacCarthaigh
b4b88ed365 Re-add a simple, obvious, speed-up.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@241814 13f79535-47bb-0310-9956-ffa450edef68
2005-08-27 23:04:17 +00:00
Colm MacCarthaigh
04558bec28 Remove as many ghastly scoreboard loops from the graceful-shutdown code, and
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
2005-08-27 22:16:46 +00:00
Colm MacCarthaigh
d7c04b158c Move the "GracefulShutdownTimeout" directive into mpm_common, for re-use
with other MPM's.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@240296 13f79535-47bb-0310-9956-ffa450edef68
2005-08-26 17:43:24 +00:00
Colm MacCarthaigh
c6fb6c57d0 Implement a "graceful-stop" for the prefork MPM (might aswell do the hard one
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
2005-08-26 16:09:54 +00:00
Colm MacCarthaigh
aacf3609d2 Implement "de-listening" for graceful restarts with the prefork MPM. With this
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
2005-08-24 16:58:11 +00:00
Justin Erenkrantz
905cdf9f0b Update copyright year to 2005 and standardize on current copyright owner line.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151408 13f79535-47bb-0310-9956-ffa450edef68
2005-02-04 20:28:49 +00:00
Joe Orton
c36ecfa64f Remove the .cvsignore files.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105796 13f79535-47bb-0310-9956-ffa450edef68
2004-11-19 09:07:29 +00:00
Joe Orton
d2e2c4e584 * modules/ssl/ssl_engine_kernel.c (ssl_callback_SSLVerify_CRL),
* server/log.c (ap_log_pid),
* server/mpm/prefork/prefork.c (accept_mutex_on, accept_mutex_off),
* support/htdbm.c (htdbm_list):
Fix some non-literal format strings (warnings from gcc -Wformat-security).

PR: 30585
Submitted by: Ulf Harnhammar (SITIC), Joe Orton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104548 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 14:25:30 +00:00
André Malo
aeed109950 the eight space tabs are harassing me.
:set tabstop=8
:retab
(no code changes)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103348 13f79535-47bb-0310-9956-ffa450edef68
2004-04-11 23:55:10 +00:00
Justin Erenkrantz
7fbfdd72cd Improve helpfulness of error messages when accept mutex has a problem.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102957 13f79535-47bb-0310-9956-ffa450edef68
2004-03-14 19:08:07 +00:00
André Malo
eeb57c17ad fix name of The Apache Software Foundation
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102619 13f79535-47bb-0310-9956-ffa450edef68
2004-02-09 20:40:53 +00:00
André Malo
9090bb2ba8 fix copyright dates according to the first check in
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102585 13f79535-47bb-0310-9956-ffa450edef68
2004-02-08 13:45:34 +00:00
André Malo
4f02cb1e18 apply Apache License, Version 2.0
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102525 13f79535-47bb-0310-9956-ffa450edef68
2004-02-06 22:58:42 +00:00
Greg Ames
1dc72a2ff6 bump MAX_SERVER_LIMIT by 10x (hoping to stay ahead of Moore's Law for a little
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
2004-01-15 15:42:38 +00:00
André Malo
fb07607180 update license to 2004.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102135 13f79535-47bb-0310-9956-ffa450edef68
2004-01-01 13:26:26 +00:00
Jeff Trawick
fe30657ac4 fix the name of the failing API call in a log message
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102042 13f79535-47bb-0310-9956-ffa450edef68
2003-12-13 15:43:19 +00:00
Jeff Trawick
ef4b1b3de7 add new MPM query -- AP_MPMQ_MPM_STATE -- to find out what the MPM
is doing

work-in-progress; not so useful until other MPMs support it


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102019 13f79535-47bb-0310-9956-ffa450edef68
2003-12-10 20:45:09 +00:00
Jeff Trawick
0f5ba4e44d build with latest other-child API changes
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101848 13f79535-47bb-0310-9956-ffa450edef68
2003-11-22 20:43:25 +00:00
Greg Stein
6ff23b5f80 Switch the prefork MPM over to the new pollset interface.
* 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
2003-11-16 23:03:18 +00:00
Jeff Trawick
de5a239b61 Fix uninitialized gprof directory name in prefork MPM.
PR:           24450
Submitted by: Chris Knight <Christopher.D.Knight@nasa.gov>
Reviewed by:  Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101714 13f79535-47bb-0310-9956-ffa450edef68
2003-11-07 13:40:04 +00:00
Joe Orton
bc2aea49ab Prevent slow graceful restarts on some platforms:
* prefork.c (ap_mpm_run): Only make as many dummy connections as slots
used, not as many as slots are available.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101513 13f79535-47bb-0310-9956-ffa450edef68
2003-10-22 11:38:46 +00:00
Bradley Nicholes
dc4cfa1640 Make sure that the global ap_max_mem_free is initialized along with the
other MPM globals whenever HTTPD is started or restarted.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101117 13f79535-47bb-0310-9956-ffa450edef68
2003-08-27 22:33:12 +00:00
Sander Striker
c61229986c Forward port patch for CAN-2003-0253 from 2.0.
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
2003-07-09 12:24:52 +00:00
Jeff Trawick
a002fa2c0d prefork MPM: Use the right permissions for the directory created
for gprof support.

Submitted by:         Jim Carlson <jcarlson@jnous.com>
Reviewed by:          Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99574 13f79535-47bb-0310-9956-ffa450edef68
2003-04-24 13:45:00 +00:00
Jeff Trawick
d1d7239bf3 the error code is in the apr_status_t, not errno
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99573 13f79535-47bb-0310-9956-ffa450edef68
2003-04-24 13:41:06 +00:00
Jeff Trawick
18af8a478c improve -DONE_PROCESS handling with prefork MPM so that
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
2003-04-23 14:59:35 +00:00
Jeff Trawick
457570612a consolidate code related to sig_coredump
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
2003-04-09 16:58:30 +00:00
André Malo
742af25096 finished that boring job:
update license to 2003.

Happy New Year! ;-))


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98573 13f79535-47bb-0310-9956-ffa450edef68
2003-02-03 17:53:28 +00:00
Greg Ames
8ecc269ba9 fix "long lost child came home!" messages after a graceful restart with
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
2002-10-23 21:16:01 +00:00
Jeff Trawick
caa6abc813 zap an unused variable
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96106 13f79535-47bb-0310-9956-ffa450edef68
2002-07-17 21:39:55 +00:00
Ryan Bloom
a87da6603e Get the prefork MPM using the apr_poll interface directly instead of going
through the old functions which are only still available for backwards
compat.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96102 13f79535-47bb-0310-9956-ffa450edef68
2002-07-17 18:42:54 +00:00
Ryan Bloom
2c94ecadce Bring Apache in line with APR's new poll implementation. This isn't
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
2002-07-11 05:42:20 +00:00
Sander Striker
62faca71e7 Add a new directive: MaxMemFree. MaxMemFree makes it possible
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
2002-07-04 15:20:54 +00:00
Jeff Trawick
bb798d7816 prefork MPM: Ignore mutex errors during graceful restart. For
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
2002-06-14 03:11:43 +00:00
Jim Jagielski
cb3975a65b Now that we have the functionality in apr, we can now have 2.0's
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
2002-06-07 14:08:05 +00:00
Sander Striker
b1d454e981 Catch up with the apr_allocator_set_owner -> apr_allocator_owner_set renames
in APR.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95373 13f79535-47bb-0310-9956-ffa450edef68
2002-05-30 00:21:27 +00:00
Jeff Trawick
0547e6e6e9 Add "-k start|startssl|restart|graceful|stop" support to httpd
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
2002-05-23 12:58:37 +00:00
Jeff Trawick
c871b41d3c stop using APLOG_NOERRNO in calls to ap_log_?error()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95149 13f79535-47bb-0310-9956-ffa450edef68
2002-05-17 11:11:39 +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
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
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
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