/[Apache-SVN]/httpd/httpd/trunk/server/mpm_common.c
ViewVC logotype

Log of /httpd/httpd/trunk/server/mpm_common.c

Parent Directory Parent Directory | Revision Log Revision Log


Links to HEAD: (view) (annotate)
Sticky Revision:

Revision 883540 - (view) (annotate) - [select for diffs]
Modified Mon Nov 23 23:17:51 2009 UTC (2 days, 9 hours ago) by trawick
File length: 11028 byte(s)
Diff to previous 818828 (colored)
Replace AcceptMutex, LockFile, RewriteLock, SSLMutex, SSLStaplingMutex,
and WatchdogMutexPath with a single Mutex directive.  Add APIs to
simplify setup and user customization of APR proc and global mutexes.  
(See util_mutex.h.)  Build-time setting DEFAULT_LOCKFILE is no longer
respected; set DEFAULT_REL_RUNTIMEDIR instead.

Some existing modules, such as mod_ldap and mod_auth_digest gain 
configurability for their mutexes.

Revision 818828 - (view) (annotate) - [select for diffs]
Modified Fri Sep 25 12:11:51 2009 UTC (2 months ago) by jim
File length: 12284 byte(s)
Diff to previous 818825 (colored)
Hmmm... forgot git commit/dcommit.

Revision 818825 - (view) (annotate) - [select for diffs]
Modified Fri Sep 25 11:59:30 2009 UTC (2 months ago) by jim
File length: 12266 byte(s)
Diff to previous 807930 (colored)
Enhance ap_hook_monitor to pass along a server_rec (in
general the ap_server_conf) and tuck away some storage
in there which may be useful as an opaque data pointer.

Revision 807930 - (view) (annotate) - [select for diffs]
Modified Wed Aug 26 08:56:13 2009 UTC (3 months ago) by bjh
File length: 12248 byte(s)
Diff to previous 762127 (colored)
Bring back OS/2 support.
Reverses r758929 with a little bit of conflict resolution.

Revision 762127 - (view) (annotate) - [select for diffs]
Modified Sun Apr 5 17:54:22 2009 UTC (7 months, 3 weeks ago) by trawick
File length: 12232 byte(s)
Diff to previous 760864 (colored)
main() can use ap_run_mpm() directly, so axe the old ap_mpm_run() function

change the mpm hooks to return OK/DONE instead of 0/1

Revision 760864 - (view) (annotate) - [select for diffs]
Modified Wed Apr 1 11:53:50 2009 UTC (7 months, 3 weeks ago) by trawick
File length: 12375 byte(s)
Diff to previous 759757 (colored)
mpm-query hook: distinguish between DECLINED and APR_ENOTIMPL so that
. ap_mpm_query() can return APR_EGENERAL if called too early (for debugging a module)
. some hypothetical module which implements the mpm-query hook can bypass the MPM
  with APR_ENOTIMPL

Revision 759757 - (view) (annotate) - [select for diffs]
Modified Sun Mar 29 19:30:17 2009 UTC (7 months, 4 weeks ago) by trawick
File length: 12277 byte(s)
Diff to previous 758944 (colored)
the mpm_get_child_pid hook is unnecessary, as was the per-MPM MPM_CHILD_PID() macro which it replaced

axe this new hook, and use ap_get_scoreboard_process() instead

Revision 758944 - (view) (annotate) - [select for diffs]
Modified Fri Mar 27 00:32:22 2009 UTC (8 months ago) by trawick
File length: 12597 byte(s)
Diff to previous 758936 (colored)
axe unmaintained 1.3-era code to support AUX, SunOS, IRIX, Next, Tandem, MPE, 
LynxOS, QNX, and UnixWare

Revision 758936 - (view) (annotate) - [select for diffs]
Modified Fri Mar 27 00:05:18 2009 UTC (8 months ago) by trawick
File length: 12761 byte(s)
Diff to previous 758929 (colored)
remove TPF support

Revision 758929 - (view) (annotate) - [select for diffs]
Modified Thu Mar 26 23:47:52 2009 UTC (8 months ago) by trawick
File length: 12794 byte(s)
Diff to previous 758891 (colored)
remove OS/2 platform support

Revision 758891 - (view) (annotate) - [select for diffs]
Modified Thu Mar 26 22:23:44 2009 UTC (8 months ago) by trawick
File length: 12810 byte(s)
Diff to previous 758613 (colored)
remove BeOS OS support

Revision 758613 - (view) (annotate) - [select for diffs]
Modified Thu Mar 26 12:44:48 2009 UTC (8 months ago) by trawick
File length: 12833 byte(s)
Diff to previous 758406 (colored)
remove leader, perchild, and threadpool MPMs (other than non-English bits in common parts of the manual)

Revision 758406 - (view) (annotate) - [select for diffs]
Modified Wed Mar 25 18:57:09 2009 UTC (8 months ago) by trawick
File length: 13308 byte(s)
Diff to previous 758367 (colored)
fix mpm_get_name hook

a string can't be used as the declined value since the hook macro must compare 
retcodes from hooks with that declined value

(thanks, gcc/Joe)

accommodate in ap_show_mpm() since we don't want to return NULL to the caller of
this simple API

Revision 758367 - (view) (annotate) - [select for diffs]
Modified Wed Mar 25 17:52:23 2009 UTC (8 months ago) by wrowe
File length: 13233 byte(s)
Diff to previous 758312 (colored)
refactor mpm_common.c into itself and mpm_unix.c for unix-specific quirks

Revision 758312 - (view) (annotate) - [select for diffs]
Modified Wed Mar 25 15:46:56 2009 UTC (8 months ago) by trawick
File length: 39841 byte(s)
Diff to previous 757853 (colored)
resurrect the old (pre-r757867) compiled-in MPM_NAME value, but via a hook for dynamically
linked MPMs

Revision 757853 - (view) (annotate) - [select for diffs]
Modified Tue Mar 24 15:43:59 2009 UTC (8 months ago) by trawick
File length: 39663 byte(s)
Diff to previous 726065 (colored)
Introduce a new set of APIs to allow MPMs to be proper modules instead
of integral parts which share global variables, functions, and macros
with the rest of httpd.

Converted now:
  prefork, worker, event, simple, WinNT*

*WinNT hasn't been built or tested, and relies on a hack to include the
WinNT mpm.h to disable Unixy MPM support routines in mpm_common.c

Revision 726065 - (view) (annotate) - [select for diffs]
Modified Fri Dec 12 16:08:16 2008 UTC (11 months, 2 weeks ago) by jorton
File length: 37740 byte(s)
Diff to previous 722399 (colored)
* server/mpm_common.c (dummy_connection): If possible, use a non-SSL
  listening port to use for the dummy connection, to avoid causing
  (confusing) error log spam by sending EOF down an SSL port.

PR: 39653

Revision 722399 - (view) (annotate) - [select for diffs]
Modified Tue Dec 2 08:13:36 2008 UTC (11 months, 3 weeks ago) by pquerna
File length: 37335 byte(s)
Diff to previous 709993 (colored)
API Cleanup in preperation for 2.4.x, make sure all exported functions or variables contain an ap_ prefix.

Revision 709993 - (view) (annotate) - [select for diffs]
Modified Mon Nov 3 00:46:54 2008 UTC (12 months, 3 weeks ago) by niq
File length: 37328 byte(s)
Diff to previous 697425 (colored)
Switch all unix MPMs to use drop_privileges hook (mod_unixd) for startup
and add a flag to prevent running without any module taking responsibility
for managing system privileges!

Revision 697425 - (view) (annotate) - [select for diffs]
Modified Sat Sep 20 22:04:03 2008 UTC (14 months ago) by pquerna
File length: 37093 byte(s)
Diff to previous 617373 (colored)
Add dummy ap_mpm_register_timed_callback for other MPMs besides Event.

Revision 617373 - (view) (annotate) - [select for diffs]
Modified Fri Feb 1 08:50:09 2008 UTC (21 months, 3 weeks ago) by martin
File length: 36800 byte(s)
Diff to previous 613263 (colored)
Avoid core dumps by getting the signal_description only if
a process actually terminated on a signal. Update status
only on a valid wait response.

Revision 613263 - (view) (annotate) - [select for diffs]
Modified Fri Jan 18 20:49:46 2008 UTC (22 months, 1 week ago) by jorton
File length: 36739 byte(s)
Diff to previous 587673 (colored)
* server/mpm_common.c (reclaim_one_pid): Retrieve the exit status from
  apr_proc_wait(); call ap_process_child_status() for children which
  terminate, to ensure that abnormal exits (e.g. SIGSEGV) are logged.

PR: 42757

Revision 587673 - (view) (annotate) - [select for diffs]
Modified Tue Oct 23 22:05:14 2007 UTC (2 years, 1 month ago) by wrowe
File length: 36596 byte(s)
Diff to previous 568833 (colored)
Unless I've misread this, POD is write-blocking, read nonblocking timeout 0.

Revision 568833 - (view) (annotate) - [select for diffs]
Modified Thu Aug 23 05:55:11 2007 UTC (2 years, 3 months ago) by wrowe
File length: 36543 byte(s)
Diff to previous 551889 (colored)
ap_available_mutexes_string and ap_add_available_mutexes_string 
cannot be data symbols when mod_ssl is built as a loadable module;
using an external string constant in a loadable module is not portable.

Also reorganize file and sem to follow their explicit mechanisms,
and ensured that the explicit mechansims are listed in order of 
preference.  

This raises a question, would [fcntl|file] be a clearer way of 
indiciating what the file/sem methods devolve to?

Revision 551889 - (view) (annotate) - [select for diffs]
Modified Fri Jun 29 13:28:58 2007 UTC (2 years, 4 months ago) by jim
File length: 36547 byte(s)
Diff to previous 551843 (colored)
getpgid() returns a pid_t


Revision 551843 - (view) (annotate) - [select for diffs]
Modified Fri Jun 29 10:33:14 2007 UTC (2 years, 4 months ago) by jorton
File length: 36545 byte(s)
Diff to previous 551835 (colored)
Add alternative fixes for CVE-2007-3304:

* configure.in: Check for getpgid.

* include/mpm_common.h (ap_mpm_safe_kill): New prototype.

* server/mpm_common.c (reclaim_one_pid): Ensure pid validity before
calling apr_proc_wait().
(ap_mpm_safe_kill): New function.

* server/mpm/prefork/prefork.c, server/mpm/worker/worker.c,
server/mpm/experimental/event/event.c: Use ap_mpm_safe_kill() on pids
from the scoreboard, throughout.

* include/ap_mmn.h: Minor bump.

Revision 551835 - (view) (annotate) - [select for diffs]
Modified Fri Jun 29 09:31:11 2007 UTC (2 years, 4 months ago) by jorton
File length: 34723 byte(s)
Diff to previous 551823 (colored)
Revert r547987 ("svn merge -c -547987 .")

Revision 551823 - (view) (annotate) - [select for diffs]
Modified Fri Jun 29 08:43:29 2007 UTC (2 years, 4 months ago) by jorton
File length: 35751 byte(s)
Diff to previous 547987 (colored)
* server/mpm/prefork/prefork.c (reap_children),
* server/mpm_common.c (ap_wait_or_timeout): Remove dead code; NEED_WAITPID
has never been defined by the 2.x build system.

Revision 547987 - (view) (annotate) - [select for diffs]
Modified Sat Jun 16 21:29:24 2007 UTC (2 years, 5 months ago) by jim
File length: 35856 byte(s)
Diff to previous 517233 (colored)
PID table impl: parent process keeps a local table store of
Apache child process PIDs and uses that to check validity
of what's in the scoreboard.

Revision 517233 - (view) (annotate) - [select for diffs]
Modified Mon Mar 12 14:49:07 2007 UTC (2 years, 8 months ago) by jorton
File length: 34828 byte(s)
Diff to previous 500897 (colored)
* server/mpm_common.c (dummy_connection): Use "OPTIONS *" for request
on dummy connection.

PR: 41796

Revision 500897 - (view) (annotate) - [select for diffs]
Modified Sun Jan 28 21:51:43 2007 UTC (2 years, 9 months ago) by rpluem
File length: 34824 byte(s)
Diff to previous 500881 (colored)
* Nitpicking: Get the comment right.

Revision 500881 - (view) (annotate) - [select for diffs]
Modified Sun Jan 28 21:14:40 2007 UTC (2 years, 9 months ago) by trawick
File length: 34824 byte(s)
Diff to previous 467326 (colored)
Unix MPMs: Catch SIGFPE so that exception hooks and CoreDumpDirectory
can work after that terminating signal.

Submitted by: Eric Covener <covener gmail.com>
Reviewed by:  trawick


Revision 467326 - (view) (annotate) - [select for diffs]
Modified Tue Oct 24 13:17:29 2006 UTC (3 years, 1 month ago) by jim
File length: 34609 byte(s)
Diff to previous 440337 (colored)
Once SSLMutex allowed for the setting of both the
locking method and the lockfile location, I never
liked how AcceptMutex was linked to LockFile. This
seemed unnecessary. Much better to have AcceptMutex
do both as well. Plus, now that we will likely see
other modules require a "standard" way of setting
mutexes, why not have Apache provide that as
an API of sorts.

Anyway, LockFile is now depreciated and AcceptMutex
is now SSLMutex-like. We also provide a short
function that "parses" out a mutex parameter
and strips out the mechanism and lockfile location.
AcceptMutex and SSLMutex is this capability.


Revision 440337 - (view) (annotate) - [select for diffs]
Modified Tue Sep 5 13:08:15 2006 UTC (3 years, 2 months ago) by trawick
File length: 35113 byte(s)
Diff to previous 420983 (colored)
Replace ap_get_server_version with ap_get_server_banner() and
ap_get_server_description().

High-level summary:

The full server version information is now included in the error log at
startup as well as server status reports, irrespective of the setting
of the ServerTokens directive.

Third-party modules must now use ap_get_server_banner() or 
ap_get_server_description() in place of ap_get_server_version().


Revision 420983 - (view) (annotate) - [select for diffs]
Modified Tue Jul 11 20:33:53 2006 UTC (3 years, 4 months ago) by fielding
File length: 35114 byte(s)
Diff to previous 395228 (colored)
update license header text

Revision 395228 - (view) (annotate) - [select for diffs]
Modified Wed Apr 19 12:11:27 2006 UTC (3 years, 7 months ago) by colm
File length: 34967 byte(s)
Diff to previous 332306 (colored)
Update the copyright year in all .c, .h and .xml files

Revision 332306 - (view) (annotate) - [select for diffs]
Modified Thu Nov 10 15:11:44 2005 UTC (4 years ago) by jim
File length: 34967 byte(s)
Diff to previous 332305 (colored)
No functional Change: Removing trailing whitespace. This also
means that "blank" lines consisting of just spaces or
tabs are now really blank lines

Revision 332305 - (view) (annotate) - [select for diffs]
Modified Thu Nov 10 15:05:51 2005 UTC (4 years ago) by jim
File length: 35043 byte(s)
Diff to previous 240465 (colored)
No functional change: simple detabbing of indented code.

Revision 240465 - (view) (annotate) - [select for diffs]
Modified Sat Aug 27 22:12:08 2005 UTC (4 years, 3 months ago) by colm
File length: 35029 byte(s)
Diff to previous 240296 (colored)
Add ap_relieve_child_processess(), a non-infanticidal copy of
ap_reclaim_child_processes(). Allows us to waitpid() each process in the
scoreboard and each "extra" process with a single call.


Revision 240296 - (view) (annotate) - [select for diffs]
Modified Fri Aug 26 17:43:24 2005 UTC (4 years, 3 months ago) by colm
File length: 34269 byte(s)
Diff to previous 240269 (colored)
Move the "GracefulShutdownTimeout" directive into mpm_common, for re-use
with other MPM's.


Revision 240269 - (view) (annotate) - [select for diffs]
Modified Fri Aug 26 16:00:59 2005 UTC (4 years, 3 months ago) by colm
File length: 33869 byte(s)
Diff to previous 239430 (colored)
Make the neccessary changes to mpm_common and main to support a graceful-stop
command line argument. 


Revision 239430 - (view) (annotate) - [select for diffs]
Modified Tue Aug 23 16:41:17 2005 UTC (4 years, 3 months ago) by colm
File length: 33440 byte(s)
Diff to previous 230808 (colored)
Remove support for the threaded-mpm's on Linux 2.0, and de-autoconf the
graceful restart signal. Frees up SIGWINCH for implementing graceful stop.
See <20050727114058.GA3390@stdlib.net> and subsequent thread on httpd-dev.


Revision 230808 - (view) (annotate) - [select for diffs]
Modified Mon Aug 8 14:37:14 2005 UTC (4 years, 3 months ago) by pquerna
File length: 33432 byte(s)
Diff to previous 202508 (colored)
Add a User-Agent to the dummy connection code to ease admin debugging.

Submitted By: Colm MacCarthaigh <colm stdlib.net>

Revision 202508 - (view) (annotate) - [select for diffs]
Modified Thu Jun 30 09:10:25 2005 UTC (4 years, 4 months ago) by jorton
File length: 33098 byte(s)
Diff to previous 202039 (colored)
* server/mpm_common.c (dummy_connection): Fix length argument passed
to apr_socket_send.  Remove redundant _shutdown call.

Revision 202039 - (view) (annotate) - [select for diffs]
Modified Mon Jun 27 19:30:23 2005 UTC (4 years, 5 months ago) by pquerna
File length: 33113 byte(s)
Diff to previous 202027 (colored)
Argh. Style Fix. Habits are hard to kill.

Revision 202027 - (view) (annotate) - [select for diffs]
Modified Mon Jun 27 18:40:56 2005 UTC (4 years, 5 months ago) by pquerna
File length: 33113 byte(s)
Diff to previous 189475 (colored)
*) server/mpm_common.c: Send a simple HTTP 1.0 request to every listener socket, instead of just closing the socket.  This fixes shutdown of the Worker MPM on FreeBSD, when Accept Filters are enabled.

In the future, we need a method to send a simple request for all protocols.  Currently this is very specific to HTTP and FreeBSD's Accept Filter.

Revision 189475 - (view) (annotate) - [select for diffs]
Modified Tue Jun 7 23:45:50 2005 UTC (4 years, 5 months ago) by niq
File length: 32574 byte(s)
Diff to previous 188846 (colored)
Fix for reported compile problem

Revision 188846 - (view) (annotate) - [select for diffs]
Modified Tue Jun 7 19:13:37 2005 UTC (4 years, 5 months ago) by niq
File length: 32559 byte(s)
Diff to previous 154044 (colored)
Add monitor hook (discussed under "watchdog" thread).


Revision 154044 - (view) (annotate) - [select for diffs]
Modified Wed Feb 16 16:44:26 2005 UTC (4 years, 9 months ago) by trawick
File length: 32330 byte(s)
Diff to previous 151408 (colored)
restore google-ability of an ancient message of great importance

Revision 151408 - (view) (annotate) - [select for diffs]
Modified Fri Feb 4 20:28:49 2005 UTC (4 years, 9 months ago) by jerenkrantz
File length: 32330 byte(s)
Diff to previous 109510 (colored)
Update copyright year to 2005 and standardize on current copyright owner line.

Revision 109510 - (view) (annotate) - [select for diffs]
Modified Thu Dec 2 17:39:22 2004 UTC (4 years, 11 months ago) by trawick
File length: 32294 byte(s)
Diff to previous 106918 (colored)
worker MPM: Fix a problem which could cause httpd processes to
remain active after shutdown.

The problem occurred when a scoreboard entry currently
in use by an exiting child process was used for a new child
process.  At that point, the MPM forgot about the exiting
child process, so ap_reclaim_child_processes() wouldn't be
able to forceably terminate it.

(An exiting child process may *never* exit due to a stuck
or long-running request being handled on one of the threads.)

Revision 106918 - (view) (annotate) - [select for diffs]
Modified Mon Nov 29 15:37:03 2004 UTC (4 years, 11 months ago) by trawick
File length: 31193 byte(s)
Diff to previous 106103 (colored)
zap extra blank in error message

Revision 106103 - (view) (annotate) - [select for diffs]
Modified Sun Nov 21 18:50:36 2004 UTC (5 years ago) by nd
File length: 31194 byte(s)
Diff to previous 105264 (colored)
general property cleanup

Revision 105264 - (view) (annotate) - [select for diffs]
Modified Thu Sep 23 08:59:06 2004 UTC (5 years, 2 months ago) by jorton
File length: 31194 byte(s)
Diff to previous 105195 (colored)
* server/mpm_common.c (dummy_connection): Log the address if the
connect() fails.

Revision 105195 - (view) (annotate) - [select for diffs]
Modified Sat Sep 18 00:33:56 2004 UTC (5 years, 2 months ago) by trawick
File length: 31162 byte(s)
Diff to previous 104651 (colored)
Unix MPMs: Shut down the server more quickly when child processes are
slow to exit.

Revision 104651 - (view) (annotate) - [select for diffs]
Modified Sat Aug 14 10:49:43 2004 UTC (5 years, 3 months ago) by trawick
File length: 30000 byte(s)
Diff to previous 102975 (colored)
tweak error handling when reading the pid file

previously strtol() would look at unitialized
storage, but now the string is terminated where
the data read ends

give user a hint about removing the file if we can't
read/parse it properly

(somehow I ended up with a truncated httpd.pid on my
own system, leading to these tweaks)

Revision 102975 - (view) (annotate) - [select for diffs]
Modified Mon Mar 15 23:08:41 2004 UTC (5 years, 8 months ago) by trawick
File length: 29862 byte(s)
Diff to previous 102931 (colored)
use existing directive name ThreadStackSize instead of
WorkerStackSize

as made obvious by: Brad Nicholes

Revision 102931 - (view) (annotate) - [select for diffs]
Modified Thu Mar 11 03:57:50 2004 UTC (5 years, 8 months ago) by trawick
File length: 29862 byte(s)
Diff to previous 102869 (colored)
Threaded MPMs for Unix and Win32: Add WorkerStackSize directive
to override default thread stack size for threads which handle
client connections.  Required for some third-party modules on
platforms with small default thread stack size.

This is also useful for trimming back the stack size on
platforms with relatively large default stack size in order to
conserve address space for supporting more threads per child.

Revision 102869 - (view) (annotate) - [select for diffs]
Modified Sat Mar 6 14:50:55 2004 UTC (5 years, 8 months ago) by jorton
File length: 29215 byte(s)
Diff to previous 102772 (colored)
* include/mpm_common.h (ap_pod_t): Remove 'sa' field.

* server/mpm_common.c (ap_mpm_pod_open, dummy_connection): Use
ap_listeners->bind_addr for the dummy connection rather than doing a
name lookup on the first listener's hostname and using one of the
addresses returned.

PR: 27313

Revision 102772 - (view) (annotate) - [select for diffs]
Modified Wed Feb 25 11:55:31 2004 UTC (5 years, 9 months ago) by jorton
File length: 29307 byte(s)
Diff to previous 102686 (colored)
* server/mpm_common.c (ap_process_child_status): Remove an escaped \n
in the error log and add some political correctness.

Revision 102686 - (view) (annotate) - [select for diffs]
Modified Thu Feb 19 11:19:43 2004 UTC (5 years, 9 months ago) by trawick
File length: 29346 byte(s)
Diff to previous 102619 (colored)
Add a new directive EnableExceptionHook that must be specified for
exception hooks to be called (in addition to the build time
requirements).

The 2.1-dev feature is now more aligned with the 1.3.30-dev feature,
in that there is a build-time requirement as well as a configuration
requirement.

Revision 102619 - (view) (annotate) - [select for diffs]
Modified Mon Feb 9 20:40:53 2004 UTC (5 years, 9 months ago) by nd
File length: 28673 byte(s)
Diff to previous 102525 (colored)
fix name of The Apache Software Foundation

Revision 102525 - (view) (annotate) - [select for diffs]
Modified Fri Feb 6 22:58:42 2004 UTC (5 years, 9 months ago) by nd
File length: 28669 byte(s)
Diff to previous 102420 (colored)
apply Apache License, Version 2.0

Revision 102420 - (view) (annotate) - [select for diffs]
Modified Tue Jan 27 17:11:04 2004 UTC (5 years, 10 months ago) by trawick
File length: 30888 byte(s)
Diff to previous 102135 (colored)
avoid losing a subpool (until restart) on a rare error path

Revision 102135 - (view) (annotate) - [select for diffs]
Modified Thu Jan 1 13:26:26 2004 UTC (5 years, 10 months ago) by nd
File length: 30830 byte(s)
Diff to previous 102033 (colored)
update license to 2004.

Revision 102033 - (view) (annotate) - [select for diffs]
Modified Thu Dec 11 19:05:30 2003 UTC (5 years, 11 months ago) by trawick
File length: 30830 byte(s)
Diff to previous 101899 (colored)
fix a problem where a crash of a non-MPM child process could
result in an error log message stating that the parent had
crashed

the problem, which affected all *X platforms, was due to an
attempt to support the general problem with linuxthreads;
this change leaves us with a relatively obscure hole when
running on linuxthreads (see comments)

Revision 101899 - (view) (annotate) - [select for diffs]
Modified Wed Nov 26 03:45:34 2003 UTC (6 years ago) by trawick
File length: 30469 byte(s)
Diff to previous 101848 (colored)
Add fatal exception hook for use by debug modules.  The hook is only
available if the --enable-exception-hook configure parm is used.

Sample users at http://httpd.apache.org/~trawick/exception_hook.html

Revision 101848 - (view) (annotate) - [select for diffs]
Modified Sat Nov 22 20:43:25 2003 UTC (6 years ago) by trawick
File length: 29919 byte(s)
Diff to previous 101154 (colored)
build with latest other-child API changes

Revision 101154 - (view) (annotate) - [select for diffs]
Modified Wed Sep 3 19:27:12 2003 UTC (6 years, 2 months ago) by trawick
File length: 29892 byte(s)
Diff to previous 99373 (colored)
switch to APR 1.0 API (which is still in flux)

because of the changes to the argument lists of apr_mmap_dup and apr_socket_create,
2.1-dev won't build with apr and apr-util's 0.9 branch anymore

Revision 99373 - (view) (annotate) - [select for diffs]
Modified Tue Apr 15 22:34:47 2003 UTC (6 years, 7 months ago) by ake
File length: 29882 byte(s)
Diff to previous 99312 (colored)
Enable ap_sock_disable_nagle for Windows. This along with the addition of
APR_TCP_NODELAY_INHERITED to apr.hw will cause Nagle to be disabled for
Windows.

Revision 99312 - (view) (annotate) - [select for diffs]
Modified Wed Apr 9 16:58:30 2003 UTC (6 years, 7 months ago) by trawick
File length: 29901 byte(s)
Diff to previous 99032 (colored)
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

Revision 99032 - (view) (annotate) - [select for diffs]
Modified Thu Mar 20 21:50:40 2003 UTC (6 years, 8 months ago) by wrowe
File length: 26910 byte(s)
Diff to previous 98908 (colored)
  SECURITY:  Eliminated leaks of several file descriptors to child
  processes, such as CGI scripts.

PR: 17206
Submitted by:	Christian Kratzer <ck@cksoft.de>, Bjoern A. Zeeb <bz@zabbadoz.net>
Reviewed by:	Joe Orton, Will Rowe

Revision 98908 - (view) (annotate) - [select for diffs]
Modified Thu Mar 6 21:48:58 2003 UTC (6 years, 8 months ago) by gregames
File length: 26785 byte(s)
Diff to previous 98573 (colored)
Linux 2.4+: enable coredumps when Apache is started as root if
            CoreDumpDirectory is explicitly coded

Revision 98573 - (view) (annotate) - [select for diffs]
Modified Mon Feb 3 17:53:28 2003 UTC (6 years, 9 months ago) by nd
File length: 26719 byte(s)
Diff to previous 96057 (colored)
finished that boring job:
update license to 2003.

Happy New Year! ;-))

Revision 96057 - (view) (annotate) - [select for diffs]
Modified Mon Jul 15 08:05:11 2002 UTC (7 years, 4 months ago) by wrowe
File length: 26719 byte(s)
Diff to previous 96055 (colored)
  http occurances to update for apr_socket_opt_get/set

Revision 96055 - (view) (annotate) - [select for diffs]
Modified Mon Jul 15 07:46:19 2002 UTC (7 years, 4 months ago) by wrowe
File length: 26709 byte(s)
Diff to previous 95955 (colored)
  Timeout/time fixes

Revision 95955 - (view) (annotate) - [select for diffs]
Modified Thu Jul 4 15:24:01 2002 UTC (7 years, 4 months ago) by striker
File length: 26719 byte(s)
Diff to previous 95954 (colored)
Now why did I commit that symbolic constant in APR again?  Exactly...
to use it here.

Revision 95954 - (view) (annotate) - [select for diffs]
Modified Thu Jul 4 15:20:54 2002 UTC (7 years, 4 months ago) by striker
File length: 26661 byte(s)
Diff to previous 95587 (colored)
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.

Revision 95587 - (view) (annotate) - [select for diffs]
Modified Sun Jun 9 03:44:03 2002 UTC (7 years, 5 months ago) by wrowe
File length: 26051 byte(s)
Diff to previous 95269 (colored)
  Well the wrappers work out well... nice to be able to put off committing
  these API changes until the evening ;)

Revision 95269 - (view) (annotate) - [select for diffs]
Modified Fri May 24 18:48:10 2002 UTC (7 years, 6 months ago) by trawick
File length: 26051 byte(s)
Diff to previous 95251 (colored)
the "-k startssl" parameter is reverted by popular demand

Revision 95251 - (view) (annotate) - [select for diffs]
Modified Thu May 23 18:31:02 2002 UTC (7 years, 6 months ago) by trawick
File length: 26354 byte(s)
Diff to previous 95237 (colored)
fix data initialization problem in new Unix -k option processing

Revision 95237 - (view) (annotate) - [select for diffs]
Modified Thu May 23 12:58:37 2002 UTC (7 years, 6 months ago) by trawick
File length: 26257 byte(s)
Diff to previous 95149 (colored)
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.

Revision 95149 - (view) (annotate) - [select for diffs]
Modified Fri May 17 11:11:39 2002 UTC (7 years, 6 months ago) by trawick
File length: 21937 byte(s)
Diff to previous 94566 (colored)
stop using APLOG_NOERRNO in calls to ap_log_?error()

Revision 94566 - (view) (annotate) - [select for diffs]
Modified Tue Apr 9 06:48:31 2002 UTC (7 years, 7 months ago) by aaron
File length: 22049 byte(s)
Diff to previous 94434 (colored)
Remove unnecessary includes of apr_lock.h

Revision 94434 - (view) (annotate) - [select for diffs]
Modified Thu Apr 4 18:36:03 2002 UTC (7 years, 7 months ago) by jim
File length: 22071 byte(s)
Diff to previous 94308 (colored)
Added support for Posix semaphore-based mutex locking (AcceptMutex posixsem).
It's between pthread and sysvsem in the DEFAULT priority ranking. This
makes it the new default for Darwin, and adds support for it for other
platforms as well (like Solaris).
PR:
Obtained from:
Submitted by:
Reviewed by:

Revision 94308 - (view) (annotate) - [select for diffs]
Modified Fri Mar 29 16:15:33 2002 UTC (7 years, 8 months ago) by rederpj
File length: 21878 byte(s)
Diff to previous 94062 (colored)
PR:
Obtained from:
Submitted by:	Paul J. Reder
Reviewed by:

Remove the MPM_SYNC_CHILD_TABLE macro since there is no longer a scoreboard
file that needs to be synched.

Revision 94062 - (view) (annotate) - [select for diffs]
Modified Wed Mar 20 22:19:11 2002 UTC (7 years, 8 months ago) by jim
File length: 21906 byte(s)
Diff to previous 94055 (colored)
Fold the compiled-in knowledge of the allowable AcceptMutex settings into
its help entry. Requires the use of a extern string rather than a function
call for the initialization to be valid in the macro (Thx to Jeff!).
In the meantime, bump down the error logging until we deal with true
default and configured setting information ala 1.3.

PR:
Obtained from:
Submitted by:
Reviewed by:

Revision 94055 - (view) (annotate) - [select for diffs]
Modified Wed Mar 20 16:44:13 2002 UTC (7 years, 8 months ago) by jim
File length: 22053 byte(s)
Diff to previous 93999 (colored)
Bring 2.0 up to parity, a bit, with how much info we provide to
the admin regarding valid values for AcceptMutex. Should also
tell 'em what "default" actually maps to, but that can wait.

PR:
Obtained from:
Submitted by:
Reviewed by:

Revision 93999 - (view) (annotate) - [select for diffs]
Modified Mon Mar 18 18:24:55 2002 UTC (7 years, 8 months ago) by trawick
File length: 21927 byte(s)
Diff to previous 93997 (colored)
Fix a hang condition with graceful restart and prefork MPM
in the situation where MaxClients is very high but
much fewer servers are actually started at the time of the
restart.

The way we notify an entire generation to die at once is
changed so that we don't have to use the pod (and deal with
the ease of filling the kernel pipe buffer).

Revision 93997 - (view) (annotate) - [select for diffs]
Modified Mon Mar 18 16:39:56 2002 UTC (7 years, 8 months ago) by trawick
File length: 21419 byte(s)
Diff to previous 93969 (colored)
don't check for EINTR after a call to apr_file_write();
you'll never see it

Revision 93969 - (view) (annotate) - [select for diffs]
Modified Sat Mar 16 18:42:46 2002 UTC (7 years, 8 months ago) by wrowe
File length: 21472 byte(s)
Diff to previous 93965 (colored)
  Simplify s/APR_OS_PROC_T_FMT/APR_PID_T_FMT/, apr_os_foo entities aren't
  for external consumption.

Revision 93965 - (view) (annotate) - [select for diffs]
Modified Sat Mar 16 18:26:58 2002 UTC (7 years, 8 months ago) by wrowe
File length: 21476 byte(s)
Diff to previous 93918 (colored)
  Eliminate potential ap_server_root_relative segfaults, with the input
  of Jeff Trawick's style changes to the first patches.  Doesn't include
  the fixes to ssl [more complex], and we won't trap errors that involve
  ap_serverroot, since we presume that was normalized on the way in.
  Therefore, testing ap_server_root_relative(DEFAULT_FOO) cases
  should never become necessary.

Revision 93918 - (view) (annotate) - [select for diffs]
Modified Wed Mar 13 20:48:07 2002 UTC (7 years, 8 months ago) by fielding
File length: 21208 byte(s)
Diff to previous 93843 (colored)
Update our copyright for this year.

Revision 93843 - (view) (annotate) - [select for diffs]
Modified Mon Mar 11 14:27:45 2002 UTC (7 years, 8 months ago) by striker
File length: 21208 byte(s)
Diff to previous 93833 (colored)
Make this look a bit better.

Revision 93833 - (view) (annotate) - [select for diffs]
Modified Mon Mar 11 10:48:58 2002 UTC (7 years, 8 months ago) by striker
File length: 21199 byte(s)
Diff to previous 93560 (colored)
Style Police comming through...

Revision 93560 - (view) (annotate) - [select for diffs]
Modified Sun Feb 24 20:41:19 2002 UTC (7 years, 9 months ago) by trawick
File length: 20909 byte(s)
Diff to previous 93479 (colored)
don't wait nearly so long for child processes to go away

the adjustment of the wait time was done too soon

now the code should be consistent with 1.3 behavior

Revision 93479 - (view) (annotate) - [select for diffs]
Modified Mon Feb 18 16:18:10 2002 UTC (7 years, 9 months ago) by trawick
File length: 20909 byte(s)
Diff to previous 93366 (colored)
close an extremely unlikely file descriptor leak in
dummy_connection()

Revision 93366 - (view) (annotate) - [select for diffs]
Modified Mon Feb 11 23:20:16 2002 UTC (7 years, 9 months ago) by gregames
File length: 20877 byte(s)
Diff to previous 92791 (colored)
if a child detects a resource shortage on accept(), limit the rate of fork()s
to 1 per second until the situation clears up.

Inspired by: Martin Kraemer

Revision 92791 - (view) (annotate) - [select for diffs]
Modified Thu Jan 10 00:28:00 2002 UTC (7 years, 10 months ago) by wrowe
File length: 20634 byte(s)
Diff to previous 92653 (colored)
  This patch eliminated from the _SHARED_ segment of the scoreboard all
  pointer math.  This is required for portable scoreboards.

  vhost becomes the 'vhost name string' so it now survives ap_generation
  clicks.  next was apparently never used.

  This patch also accounts for the changes to the apr_shm api, and gives
  Win32 the magic of a shared scoreboard.

  Breakage aplenty on non-win32 platforms, I suspect, but this radical
  surgery, and culling of unused functions, was really, really needed.

Revision 92653 - (view) (annotate) - [select for diffs]
Modified Sat Dec 29 23:16:24 2001 UTC (7 years, 10 months ago) by trawick
File length: 20615 byte(s)
Diff to previous 92512 (colored)
handle the disappearance of apr_lock_create_np() and
apr_proc_mutex_create_np() and the new parameter to
apr_lock_create() and apr_proc_mutex_create()

Revision 92512 - (view) (annotate) - [select for diffs]
Modified Tue Dec 18 13:48:54 2001 UTC (7 years, 11 months ago) by trawick
File length: 20618 byte(s)
Diff to previous 92437 (colored)
Change core code to allow an MPM to set hard thread/server
limits at startup.

Revision 92437 - (view) (annotate) - [select for diffs]
Modified Wed Dec 12 23:56:46 2001 UTC (7 years, 11 months ago) by aaron
File length: 20593 byte(s)
Diff to previous 92411 (colored)
Fix a bug in how we select the IP for the POD to connect to for dummy
connects (dislodging a doomed child from the accept mutex). No longer
do we assume that the child is listening to 127.0.0.1, but instead
we just pick the first hostname/port from the listen rec.

Revision 92411 - (view) (annotate) - [select for diffs]
Modified Mon Dec 10 20:10:05 2001 UTC (7 years, 11 months ago) by gregames
File length: 20545 byte(s)
Diff to previous 92305 (colored)
fix a problem with graceful restart.  If you look at daedalus early in the
morning, you will usually see lots ( >50 ) of old generation processes
happily serving requests with yesterday's config.  Late in the afternoon, they
are usually gone due to MaxRequestsPerChild and perform_idle_server_maintenance.

ap_mpm_pod_signal can time out during connect(), causing it to exit with an
error.  If it was called by ap_mpm_pod_killpg during graceful restart,
ap_mpm_pod_killpg will exit immediately.  This can cause us to not write
enough characters to the pod to kill off all the old generation children.

This fix decouples the loop which writes to the pod from the loop which
generates dummy connect()s.  The connect()s aren't as important as
writing to the pod when there is a steady stream of inbound connections.

also, close the socket and destroy the temporary pool if the connect()
fails.

Revision 92305 - (view) (annotate) - [select for diffs]
Modified Tue Dec 4 01:04:17 2001 UTC (7 years, 11 months ago) by trawick
File length: 19889 byte(s)
Diff to previous 92020 (colored)
get prototype for strcasecmp() on AIX

Revision 92020 - (view) (annotate) - [select for diffs]
Modified Sat Nov 17 14:09:14 2001 UTC (8 years ago) by trawick
File length: 19842 byte(s)
Diff to previous 92019 (colored)
make sure ap_process_child_status() always returns something

Revision 92019 - (view) (annotate) - [select for diffs]
Modified Sat Nov 17 14:02:26 2001 UTC (8 years ago) by trawick
File length: 19828 byte(s)
Diff to previous 91648 (colored)
Get mod_cgid killed when a MPM exits due to a fatal error.
Presumably other such processes are affected to.  Now we
give main() a chance to clean up.

Revision 91648 - (view) (annotate) - [select for diffs]
Modified Tue Oct 23 17:30:07 2001 UTC (8 years, 1 month ago) by rbb
File length: 19705 byte(s)
Diff to previous 91101 (colored)
Fix the reporting for child processes that die.  This removes
all of the non-portable W* macros from Apache.

Submitted by:	Jeff Trawick and Ryan Bloom

Revision 91101 - (view) (annotate) - [select for diffs]
Modified Fri Sep 21 14:29:33 2001 UTC (8 years, 2 months ago) by jerenkrantz
File length: 19652 byte(s)
Diff to previous 91093 (colored)
Switch proc_pthread to pthread for the AcceptMutex directive.

Revision 91093 - (view) (annotate) - [select for diffs]
Modified Thu Sep 20 09:03:24 2001 UTC (8 years, 2 months ago) by gstein
File length: 19662 byte(s)
Diff to previous 91076 (colored)
Add an extra parameter to all apr_proc_wait() calls for the new "exitcode"
parameter. Pass NULL because we aren't interested in the value.

Revision 91076 - (view) (annotate) - [select for diffs]
Modified Tue Sep 18 22:13:59 2001 UTC (8 years, 2 months ago) by jerenkrantz
File length: 19656 byte(s)
Diff to previous 91029 (colored)
Switch back to SIGUSR1 for graceful restarts on all platforms that
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.

Revision 91029 - (view) (annotate) - [select for diffs]
Modified Fri Sep 14 23:28:41 2001 UTC (8 years, 2 months ago) by bnicholes
File length: 19649 byte(s)
Diff to previous 90213 (colored)
Added NetWare to the #ifdef list

Revision 90213 - (view) (annotate) - [select for diffs]
Modified Thu Aug 16 13:59:14 2001 UTC (8 years, 3 months ago) by trawick
File length: 19629 byte(s)
Diff to previous 90153 (colored)
The Unix MPMs other than perchild now allow child server
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

Revision 90153 - (view) (annotate) - [select for diffs]
Modified Tue Aug 14 12:30:50 2001 UTC (8 years, 3 months ago) by trawick
File length: 19332 byte(s)
Diff to previous 90141 (colored)
namespace-protect accept_lock_mech

fix a bug in the worker MPM which effectively disabled the AcceptMutex
directive

Revision 90141 - (view) (annotate) - [select for diffs]
Modified Mon Aug 13 18:24:53 2001 UTC (8 years, 3 months ago) by trawick
File length: 19314 byte(s)
Diff to previous 90138 (colored)
change the name of AP_MPM_NEEDS_RECLAIM_CHILD_PROCESSES to
be more consistent with similar names added recently; this
also cleans up an #if/#ifdef discrepency

Revision 90138 - (view) (annotate) - [select for diffs]
Modified Mon Aug 13 16:42:13 2001 UTC (8 years, 3 months ago) by trawick
File length: 19316 byte(s)
Diff to previous 90137 (colored)
(hopefully) get WinNT MPM to build using mpm_common.c code; a few notes:

. the selection of ap_sock_disable() is certainly ugly, but that may
  need to be cleaned up in a different manner...
. the directive functions couldn't be AP_DECLARE() if they are to be
  compatible with AP_INIT_TAKExxx(); this is an old restriction

Revision 90137 - (view) (annotate) - [select for diffs]
Modified Mon Aug 13 15:44:00 2001 UTC (8 years, 3 months ago) by trawick
File length: 19255 byte(s)
Diff to previous 90132 (colored)
allow non-Unix MPMs to use mpm_common.c by not automatically
building in Unix-specific code

Revision 90132 - (view) (annotate) - [select for diffs]
Modified Mon Aug 13 04:57:35 2001 UTC (8 years, 3 months ago) by rbb
File length: 19028 byte(s)
Diff to previous 89612 (colored)
Begin to sanitize the MPM configuration directives.  Now, all
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>

Revision 89612 - (view) (annotate) - [select for diffs]
Modified Wed Jul 18 21:16:40 2001 UTC (8 years, 4 months ago) by gregames
File length: 15224 byte(s)
Diff to previous 89604 (colored)
fix memory leak of apr_sockaddr_t and apr_socket_t in ap_mpm_pod_signal,
called by perform_idle_server_maintenance.

allocate & init one apr_sockaddr_t for the dummy connect at pod open time.
use a temporary subpool for the apr_socket_t

Revision 89604 - (view) (annotate) - [select for diffs]
Modified Wed Jul 18 20:29:00 2001 UTC (8 years, 4 months ago) by rederpj
File length: 14950 byte(s)
Diff to previous 89592 (colored)

Changed AP_MPMQ_MAX_DAEMONS to refer to MaxClients and
added an AP_MPMQ_MAX_DAEMON_USED to refer to the highest
daemon index actually used in the scoreboard. I also
updated the pertinent calls.

Paul J. Reder

Revision 89592 - (view) (annotate) - [select for diffs]
Modified Wed Jul 18 16:56:55 2001 UTC (8 years, 4 months ago) by wrowe
File length: 14946 byte(s)
Diff to previous 89557 (colored)
  Changes to back out inherit flag from apr_os_sock_make()
  and apr_socket_create()

Revision 89557 - (view) (annotate) - [select for diffs]
Modified Mon Jul 16 16:11:05 2001 UTC (8 years, 4 months ago) by rbb
File length: 14962 byte(s)
Diff to previous 89539 (colored)
Added an inherit flag to apr_socket_create and other socket creation
functions.  This allows APR programs to specify that a socket should
be passed to any child processes that are created.  The inherit flag
is only meaningful if programs use apr_process_create().  This
also adds a couple of macros that allow APR types to set and unset
the inherit flag.

This also fixes Apache to use the new API.

Revision 89539 - (view) (annotate) - [select for diffs]
Modified Wed Jul 11 14:48:23 2001 UTC (8 years, 4 months ago) by trawick
File length: 14946 byte(s)
Diff to previous 89335 (colored)
Fix an issue with the pod and prefork:

when the parent process wakes up a server process via connect(), use
an APR timeout on the connect() so that we don't hang for a long time
if there aren't server processes around to do accept()

Revision 89335 - (view) (annotate) - [select for diffs]
Modified Mon Jun 11 18:23:21 2001 UTC (8 years, 5 months ago) by trawick
File length: 13953 byte(s)
Diff to previous 89314 (colored)
back out a change from last week that reversed the meaning of pod_in and
pod_out; after that change, all read and write syscalls on the handles
failed because pod_in was only readable and pod_out was only writable

we could instead reverse the order of the parameters to apr_pipe_create
so that the descriptors returned by pipe() get put in the right place,
but it seems better to stick with APR terminology for what is the input
handle and what is the output handle

Revision 89314 - (view) (annotate) - [select for diffs]
Modified Sat Jun 9 02:57:46 2001 UTC (8 years, 5 months ago) by trawick
File length: 13954 byte(s)
Diff to previous 89310 (colored)
pod_in shouldn't be non-blocking after all
Submitted by:	Ryan Bloom

Revision 89310 - (view) (annotate) - [select for diffs]
Modified Fri Jun 8 16:53:10 2001 UTC (8 years, 5 months ago) by trawick
File length: 14004 byte(s)
Diff to previous 89303 (colored)
the input handle to the pod (used by child processes) needs to be non-blocking

before this, no requests could be processed by prefork since after connect
from the client prefork would block reading the pod

the write handle to the pod probably doesn't have to be non-blocking, but
getting EAGAIN for the pipe-full condition, rather than blocking, is nice
for now since it would tend to indicate that something is FUBAR; on the other
hand, this probably needs to change in order to support more than 4K workers

Revision 89303 - (view) (annotate) - [select for diffs]
Modified Fri Jun 8 04:55:44 2001 UTC (8 years, 5 months ago) by rbb
File length: 13954 byte(s)
Diff to previous 89296 (colored)
It helps to write to the input side of the pipe, and read from the output
side.

Revision 89296 - (view) (annotate) - [select for diffs]
Modified Thu Jun 7 17:22:12 2001 UTC (8 years, 5 months ago) by trawick
File length: 13954 byte(s)
Diff to previous 89294 (colored)
trace failures of a couple of crucial socket calls in ap_mpm_pod_signal()

Revision 89294 - (view) (annotate) - [select for diffs]
Modified Thu Jun 7 15:18:28 2001 UTC (8 years, 5 months ago) by trawick
File length: 13596 byte(s)
Diff to previous 89282 (colored)
improve ap_mpm_pod_signal() by not let it loop until it fills the pipe

it still doesn't handle the pipe being full for other reasons (bazillions
of child processes?), but I'm not sure that is a real occurrence

Revision 89282 - (view) (annotate) - [select for diffs]
Modified Thu Jun 7 00:09:16 2001 UTC (8 years, 5 months ago) by rbb
File length: 13745 byte(s)
Diff to previous 89131 (colored)
First pass at the pipe_of_death logic for the prefork MPM.  This does
pass some initial testing, but it needs to be banged on more.  It looks
like if the server gets a lot of requests to restart all at once, there
are potential problems, but other than that this does seem to solve our
current restart issues.

Revision 89131 - (view) (annotate) - [select for diffs]
Modified Wed May 16 20:51:38 2001 UTC (8 years, 6 months ago) by stoddard
File length: 11772 byte(s)
Diff to previous 88986 (colored)
Remove calls to apr_proc_probe_writable_fds(). The function is going away.

Revision 88986 - (view) (annotate) - [select for diffs]
Modified Fri May 4 18:42:51 2001 UTC (8 years, 6 months ago) by trawick
File length: 11842 byte(s)
Diff to previous 88741 (colored)
Build (and do so cleanly) when !APR_HAS_OTHER_CHILD.

Revision 88741 - (view) (annotate) - [select for diffs]
Modified Fri Apr 6 20:12:09 2001 UTC (8 years, 7 months ago) by rederpj
File length: 11856 byte(s)
Diff to previous 88537 (colored)
Changes required to make prefork clean up idle children properly. There was a window during which a starting worker deadlocks when an idle cleanup arrives before it completes init. Apache then keeps trying to cleanup the same deadlocked worker forever (until higher pids come along, but it still will never reduce below the deadlocked pid). Thus the number of children would not reduce to the correct idle level.

Revision 88537 - (view) (annotate) - [select for diffs]
Modified Mon Mar 19 13:07:28 2001 UTC (8 years, 8 months ago) by bjh
File length: 11856 byte(s)
Diff to previous 88437 (colored)
Declaration of ap_reclaim_child_processes() in exports.c needs to be
conditional in the same way that the function's definition is so give it a
suitable macro that will be recogized by the scripts that make exports.c.

Revision 88437 - (view) (annotate) - [select for diffs]
Modified Fri Mar 2 22:46:33 2001 UTC (8 years, 8 months ago) by rbb
File length: 11853 byte(s)
Diff to previous 88184 (colored)
Allow modules to query the MPM about it's execution profile.  This
query API can and should be extended in the future, but for now,
max_daemons, and threading or forking is a very good start.

Non-Unix MPM's do have the MPM query function, although there is no
garauntee that the information is perfect, please check.

Submitted by:	Jon Travis <jtravis@covalent.net>

Revision 88184 - (view) (annotate) - [select for diffs]
Modified Fri Feb 16 04:26:53 2001 UTC (8 years, 9 months ago) by fielding
File length: 11823 byte(s)
Diff to previous 88103 (colored)
Update copyright to 2001

Revision 88103 - (view) (annotate) - [select for diffs]
Modified Mon Feb 12 02:49:56 2001 UTC (8 years, 9 months ago) by gstein
File length: 11818 byte(s)
Diff to previous 88079 (colored)
*) remove some obsolete/unused defines from httpd.h.
*) remove DEFAULT_XFERLOG from main.c; it is never set/used
*) move ap_get_max_daemons() to ap_mpm.h
*) move DEFAULT_LISTENBACKLOG to mpm_common.h

Revision 88079 - (view) (annotate) - [select for diffs]
Modified Sun Feb 11 00:44:40 2001 UTC (8 years, 9 months ago) by gstein
File length: 11798 byte(s)
Diff to previous 88019 (colored)
toss the signal description stuff from unixd.[ch], beosd.h, and spmt_os2.
use the new functionality in APR.

Revision 88019 - (view) (annotate) - [select for diffs]
Modified Thu Feb 8 07:45:33 2001 UTC (8 years, 9 months ago) by dougm
File length: 12168 byte(s)
Diff to previous 87881 (colored)
renaming various functions for consistency sake
see: http://apr.apache.org/~dougm/apr_rename.pl
PR:
Obtained from:
Submitted by:
Reviewed by:

Revision 87881 - (view) (annotate) - [select for diffs]
Modified Sun Jan 28 01:16:37 2001 UTC (8 years, 10 months ago) by rbb
File length: 12153 byte(s)
Diff to previous 87777 (colored)
Make the Prefork MPM use SIGWINCH instead of SIGUSR1 for graceful restarts.

Revision 87777 - (view) (annotate) - [select for diffs]
Modified Sun Jan 21 14:52:12 2001 UTC (8 years, 10 months ago) by bjh
File length: 12152 byte(s)
Diff to previous 87755 (colored)
Add headers needed for getpwnam & getgrnam prototypes & types.

Revision 87755 - (view) (annotate) - [select for diffs]
Modified Sat Jan 20 06:05:15 2001 UTC (8 years, 10 months ago) by rbb
File length: 12067 byte(s)
Diff to previous 87080 (colored)
Move initgroupgs, ap_uname2id and ap_gname2id from util.c to
mpm_common.c.  These functions are only valid on some platforms,
so they should not be in the main-line code.

These functions are also not portable to non-unix platforms, so they don't
really belong in APR.  Since they are only used in MPMs, for right now,
I am moving them to mpm_common.c

Revision 87080 - (view) (annotate) - [select for diffs]
Modified Sun Nov 26 04:47:43 2000 UTC (9 years ago) by gstein
File length: 10432 byte(s)
Diff to previous 86405 (colored)
*) Compensate for recent changes in the APR headers. Specifically, some
   files need to specifically include stdio.h, or a particular apr_*.h
   header.

*) Adjust callers of apr_create_process() to deal with the extra "const"

*) Add "const" to args of ap_os_create_privileged_process()

Revision 86405 - (view) (annotate) - [select for diffs]
Modified Thu Oct 5 17:33:14 2000 UTC (9 years, 1 month ago) by wrowe
File length: 10523 byte(s)
Diff to previous 86133 (colored)
  The lots of little ones... APR_IS_STATUS_condition(rv) conditional macros
  replacing the majority of fallible rv == APR_condition tests.  But there
  are lots more to fix, these are the obvious ones that already did proper
  canonical error conversion.

Revision 86133 - (view) (annotate) - [select for diffs]
Modified Tue Aug 22 15:09:28 2000 UTC (9 years, 3 months ago) by bjh
File length: 10528 byte(s)
Diff to previous 86008 (colored)
APRize disabling nagle (setting TCP_NODELAY).
Note that several areas have not been tested as they apply to MPMs or APR
code that I can't test.

PR:
Obtained from:
Submitted by:
Reviewed by:

Revision 86008 - (view) (annotate) - [select for diffs]
Modified Sun Aug 6 06:07:53 2000 UTC (9 years, 3 months ago) by wrowe
File length: 10563 byte(s)
Diff to previous 85976 (colored)
  Remaining cleanup of ap_ -> apr_ and AP_ -> APR_ transformation...
  see src/lib/apr/apr_compat.h for most details.
  Also a few minor nits to get Win32 to build.

PR:
Obtained from:
Submitted by:
Reviewed by:

Revision 85976 - (view) (annotate) - [select for diffs]
Modified Wed Aug 2 05:27:38 2000 UTC (9 years, 3 months ago) by dougm
File length: 10561 byte(s)
Diff to previous 85951 (colored)
prefix libapr functions and types with apr_

Revision 85951 - (view) (annotate) - [select for diffs]
Modified Sun Jul 30 12:03:48 2000 UTC (9 years, 3 months ago) by manoj
File length: 10548 byte(s)
Diff to previous 85950 (colored)
Eliminate references to specific MPMs from mpm_common.c by having the
MPMs export interfaces to the tables used to keep track of children.

Revision 85950 - (view) (annotate) - [select for diffs]
Modified Sun Jul 30 11:49:29 2000 UTC (9 years, 3 months ago) by manoj
File length: 10935 byte(s)
Diff to previous 85902 (colored)
Change semantics of ap_child_table somewhat. Instead of checking for a
dead process with status == SERVER_DEAD, check with pid == 0. This
makes somewhat more sense conceptually, and also matches the behavior
of MPMs that use a shmem scoreboard to track children.

Revision 85902 - (view) (annotate) - [select for diffs]
Modified Thu Jul 27 00:16:32 2000 UTC (9 years, 4 months ago) by rbb
File length: 11085 byte(s)
Diff to previous 85901 (colored)
Add a new MPM.  Currently this is almost an exact copy of the dexter MPM.
In time, this will be the MPM that allows each child process to have a
unique user id.  I need a place to work and keep track of my changes.
Don't expect this to work until next week sometime.

Revision 85901 - (view) (annotate) - [select for diffs]
Modified Thu Jul 27 00:04:11 2000 UTC (9 years, 4 months ago) by rbb
File length: 11081 byte(s)
Diff to previous 85899 (colored)
Cleanup the MPM #defines.  Each MPM #defines a unique name that identifies
it to the system.  That name should be of the format NAME_MPM where name
is something like DEXTER, MPMT_PTHREAD, SPMT_OS2, etc.

Revision 85899 - (view) (annotate) - [select for diffs]
Modified Wed Jul 26 18:07:34 2000 UTC (9 years, 4 months ago) by trawick
File length: 11100 byte(s)
Diff to previous 85894 (colored)
Fix some build issues for dexter:

. dexter/scoreboard.c needed apr_strings.h to get the right
  function prototypes

. main/mpm_common.c needed to recognize that we were building
  for dexter; otherwise, no ap_reclaim_child_processes() was
  compiled and linking failed

(It would be nice to standardize on which preprocessor symbols
are checked for...  mpmname_MPM seems nice enough.  Didn't the
check for symbol mpmname (no "_MPM") come with mpmt.c?)

Revision 85894 - (view) (annotate) - [select for diffs]
Modified Wed Jul 26 14:12:38 2000 UTC (9 years, 4 months ago) by trawick
File length: 11077 byte(s)
Diff to previous 85878 (colored)
Get ap_socket_disable_nagle() working again.
Submitted by:	Greg Ames
Reviewed by:	Jeff Trawick

Revision 85878 - (view) (annotate) - [select for diffs]
Modified Tue Jul 25 01:06:32 2000 UTC (9 years, 4 months ago) by wrowe
File length: 10996 byte(s)
Diff to previous 85821 (colored)
  Add APR_EOL_STR for a platform specific text delimiter, provided by
  apr.h (defined in apr.h.in and apr.hw).  This is needed -only- in APR
  created files (true raw files) such as logs.  It is not required in any
  splat to screen (stderr/stdout) formatting, nor any html markup.

  Some other modules slipped through in the prior apr_strings.h commit.
  Sorry 'bout that.

PR:
Obtained from:
Submitted by:
Reviewed by:

Revision 85821 - (view) (annotate) - [select for diffs]
Modified Tue Jul 11 22:12:18 2000 UTC (9 years, 4 months ago) by stoddard
File length: 10987 byte(s)
Diff to previous 85819 (colored)
#ifdef APR_HAS_OTHER_CHILD to #if APR_HAS_OTHER_CHILD. Not tested.

Revision 85819 - (view) (annotate) - [select for diffs]
Modified Tue Jul 11 19:00:16 2000 UTC (9 years, 4 months ago) by rbb
File length: 10990 byte(s)
Diff to previous 85811 (colored)
Remove all pthreads calls from the mpmt MPM prefork emulation.  This makes
the mpmt MPM look almost exactly like the original prefork MPM.  Basically,
all that's left is re-naming the defined directives so they work with 1.3
config files.  That will come later.

Revision 85811 - (view) (annotate) - [select for diffs]
Modified Mon Jul 10 22:08:11 2000 UTC (9 years, 4 months ago) by rbb
File length: 10993 byte(s)
Diff to previous 85808 (colored)
Move sock_disable_nagle to mpm_common.c.  Rename it to ap_sock_disable_nagle.
Again, I tried to modify all MPMs that are currently using this code.

Revision 85808 - (view) (annotate) - [select for diffs]
Modified Mon Jul 10 18:21:24 2000 UTC (9 years, 4 months ago) by rbb
File length: 10137 byte(s)
Diff to previous 85799 (colored)
Move process_child_status to mpm_common.c.  This requires re-naming it
to ap_process_child_status and opening up ap_coredump_dir.  I have
modified all of the MPMs that I saw using this function to work with this
patch.  Sorry if I broke anybody.

Revision 85799 - (view) (annotate) - [select for diffs]
Modified Sun Jul 9 23:12:44 2000 UTC (9 years, 4 months ago) by rbb
File length: 8265 byte(s)
Diff to previous 85788 (colored)
Fix mpm_common for use with the real prefork MPM.  This was broken when
mpmt was added.  This change can be removed when the MPM stuff calms down
a bit and either mpmt or three separate MPMs are chosen.

Revision 85788 - (view) (annotate) - [select for diffs]
Modified Fri Jul 7 17:35:41 2000 UTC (9 years, 4 months ago) by rbb
File length: 8241 byte(s)
Diff to previous 85658 (colored)
Initial version of the mpmt MPM.  This MPM can emulate dexter, mpmt_pthread,
and prefork.  This basically just combines a lot of common code.  This
builds and serves pages in all three modes, but I don't think killing
the server works in any of them.  The configuration system hasn't changed
at all, so using --with-mpm=(prefork|dexter|mpmt_pthread) all work.

My goal is to remove the three separate MPMs in a few days, and then work
on merging one of the BeOS and the OS/2 MPMs into this as well.  :-)

Revision 85658 - (view) (annotate) - [select for diffs]
Modified Thu Jun 22 18:28:07 2000 UTC (9 years, 5 months ago) by dreid
File length: 8250 byte(s)
Diff to previous 85657 (colored)
Add the EXTRA_LIBS to get apache building on BONE again and now that
we're using ap_sleep remove the need for sys/socket.h in mpm_common.c

Revision 85657 - (view) (annotate) - [select for diffs]
Modified Thu Jun 22 16:55:01 2000 UTC (9 years, 5 months ago) by rbb
File length: 8298 byte(s)
Diff to previous 85655 (colored)
Remove a few unnecessary calls to select.  These calls used to be made so
that we would sleep for a specified number of microseconds.  APR provides
a function ap_sleep that does this for us.

Revision 85655 - (view) (annotate) - [select for diffs]
Modified Thu Jun 22 01:36:33 2000 UTC (9 years, 5 months ago) by dreid
File length: 8555 byte(s)
Diff to previous 85653 (colored)
Cut free mpm_common.c from ap_max_daemons_limit as a variable.  Now we
get the value from the MPM and thus free the MPM to use any variable
name they like.

Revision 85653 - (view) (annotate) - [select for diffs]
Modified Thu Jun 22 00:41:43 2000 UTC (9 years, 5 months ago) by dreid
File length: 8520 byte(s)
Diff to previous 85621 (colored)
Small change in an effort to get restarts working correctly on BeOS.

Revision 85621 - (view) (annotate) - [select for diffs]
Modified Mon Jun 19 21:11:49 2000 UTC (9 years, 5 months ago) by dreid
File length: 8093 byte(s)
Diff to previous 85569 (colored)
Update mpm_common to work with the latest BeOS version and start
adding support for a new BeOS MPM that I'll commit in a few days.

Revision 85569 - (view) (annotate) - [select for diffs]
Modified Wed Jun 14 13:50:40 2000 UTC (9 years, 5 months ago) by dreid
File length: 8024 byte(s)
Diff to previous 85488 (colored)
Add sys/time.h to mpm_common to include define of timeval.

Revision 85488 - (view) (annotate) - [select for diffs]
Modified Fri Jun 9 22:05:36 2000 UTC (9 years, 5 months ago) by rbb
File length: 7944 byte(s)
Diff to previous 85372 (colored)
Remove waitpid from the config checks and all calls to waitpid from the
server.

Revision 85372 - (view) (annotate) - [select for diffs]
Modified Thu Jun 1 18:42:04 2000 UTC (9 years, 5 months ago) by dreid
File length: 7882 byte(s)
Diff to previous 85333 (colored)
Add support for the BeOS mpm.  Also change some things to make it easier
for future additions.

Revision 85333 - (view) (annotate) - [select for diffs]
Modified Sun May 28 12:20:04 2000 UTC (9 years, 6 months ago) by bjh
File length: 7867 byte(s)
Diff to previous 85286 (colored)
Only compile ap_reclaim_child_processes() if a CHILD_INFO_TABLE is known.

Revision 85286 - (view) (annotate) - [select for diffs]
Modified Wed May 24 00:42:01 2000 UTC (9 years, 6 months ago) by rbb
File length: 7836 byte(s)
Diff to previous 85284 (colored)
Fix a memory leak with ap_wait_or_timeout.

Revision 85284 - (view) (annotate) - [select for diffs]
Modified Tue May 23 23:32:35 2000 UTC (9 years, 6 months ago) by gstein
File length: 7852 byte(s)
Diff to previous 85283 (colored)
use the correct size for 'ret'

Revision 85283 - (view) (annotate) - [select for diffs]
Modified Tue May 23 23:26:51 2000 UTC (9 years, 6 months ago) by rbb
File length: 7851 byte(s)
Diff to previous 85279 (colored)
Fix a small bug/warning when compiling with use-maintiner-mode related
to the ap_proc_t change.

Revision 85279 - (view) (annotate) - [select for diffs]
Modified Tue May 23 21:04:03 2000 UTC (9 years, 6 months ago) by rbb
File length: 7822 byte(s)
Diff to previous 85257 (colored)
Convert ap_proc_t to a complete type.  This lets us access the pid directly.
Only the prefork MPM has been ported so far, the rest of the Unix MPM's are
coming later today.

Revision 85257 - (view) (annotate) - [select for diffs]
Modified Fri May 19 07:10:57 2000 UTC (9 years, 6 months ago) by fielding
File length: 7830 byte(s)
Diff to previous 85252 (colored)
Temporary fix for misuse of int instead of pid_t.
Also include mpm_common.h to pick up the common prototypes.

Revision 85252 - (view) (annotate) - [select for diffs]
Modified Fri May 19 02:37:17 2000 UTC (9 years, 6 months ago) by trawick
File length: 7720 byte(s)
Diff to previous 85250 (colored)
ap_wait_or_timeout() can't be static since it is called from
dexter.c, prefork.c, and mpmt_pthread.c.

(Yes, we still need a function prototype somewhere, but at least we
can link properly now.)

Revision 85250 - (view) (annotate) - [select for diffs]
Modified Fri May 19 01:05:26 2000 UTC (9 years, 6 months ago) by rbb
File length: 7727 byte(s)
Diff to previous 85249 (colored)
Move wait_or_timeout from the MPM's into the new mpm_common.c file.  I
also renamed wait_or_timeout to ap_wait_or_timeout for namespace
protection.

Revision 85249 - (view) (annotate) - [select for diffs]
Added Thu May 18 23:25:06 2000 UTC (9 years, 6 months ago) by rbb
File length: 6726 byte(s)
First function removed from Unix MPM's and moved to a common file.  This
work is not anywhere near finished, but the cleanup has begun at least.
Had to make a couple of variables non-static, so a name change was required
since they are now viewable from outside the library.  The advantage to this
is code that is much easier to maintain into the future, because it is
duplicated less often.

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

apache@apache.org
ViewVC Help
Powered by ViewVC 1.1.2