Checkout Tools
  • last updated 20 mins ago
Constraints: committers
Constraints: files
Constraints: dates

Changeset 1593857 is being indexed.

Extend the socket callbacks in event to allow a timeout on the I/O callback.

When a socket callback has a timeout, an associated timer event is used to

remove the sockets from the pollset and call a timeout function.

* This includes a noteworthy change to the main event loop. Previously,

we would call epoll, then process the timer events, then iterate through the

poll results. After this patch, the timer events are processed before the poll()

a _non-queued_ action can change the pollset conents (a users timed callback

function conversely could easily sit in a queue while the main thread continues

down into epoll)

* timer events can now have sockets associated with them, those sockets are

removed from the pollset when the timer event fires w/o a queue to the worker.

* timer events now have a canceled flag that can be toggled without locking

the timer list.

* Drop the severity of some wstunnel messages from DEBUG to TRACE1

* Lift the restriction on using asynchronous websockets connections but having

an idle timeout

  1. … 8 more files in changeset.
avoid duplication of APR_HOOK_LINK invocations

Follow-up to r1546759: Fix compilation when exception hooks aren't enabled.

Add suspend_connection and resume_connection hooks to notify modules

when the thread/connection relationship changes. (Currently implemented

only for the Event MPM; should be implemented for all async MPMs.)

  1. … 4 more files in changeset.
Fix potential rejection of valid MaxMemFree and ThreadStackSize


Submitted by: Mike Rumph <mike.rumph>

Reviewed by: trawick

  1. … 1 more file in changeset.
Fold in Eric Covener's socket callback

  1. … 4 more files in changeset.
The Pidfile directive and ap_log_pid()/ap_remove_pid()/ap_read_pid()

now respect DefaultRuntimeDir

  1. … 6 more files in changeset.
Revert r1294936 (Jeff's revert) and fix NetWare / Win32 build.

Added the missing AP_DECLARE* decorations for the function

implementations and variables.

  1. … 5 more files in changeset.
Add lots of unique tags to error log messages

  1. … 172 more files in changeset.
Folloup on r1201158: New MaxMemFree was meant

to be 2048, not 4096.

Set MaxMemFree 2048 by default

  1. … 3 more files in changeset.
end-generation hook: Fix false notification of end-of-generation for

temporary intervals with no active MPM children.

  1. … 3 more files in changeset.
Call apr_random_after_fork() manually in the child processes because the MPMs

use plain fork() and not apr_proc_fork().

Also add some workaround for APR not changing the RNG state in the parent.

  1. … 2 more files in changeset.
Consistently use base 10 for numbers when parsing config options. It may be

confusing to the user if some directives treat a number with leading zero as

octal while most don't.

  1. … 4 more files in changeset.
Add -D DUMP_RUN_CFG option to dump some configuration items

from the parsed (or default) config. This is useful for init scripts that

need to setup temporary directories and permissions, for example if those

temporary directories are located on a ram disk.

  1. … 10 more files in changeset.
Export ap_max_mem_free, needed by r1178079, as pointed out by Gregg L. Smith

  1. … 2 more files in changeset.
* server/mpm_common.c (ap_core_child_status): Allocate the geninfo,

unused_geninfo ring heads from the heap; fixing gcc aliasing


Log the deprecation warning at level info, not warn

  1. … 3 more files in changeset.
Introduce ap_(get|set)_core_module_config() functions/macros and use them


We know that the core module has module_index 0. Therefore we can save

some pointer operations in ap_get_module_config(cv, &core_module) and

ap_set_module_config(cv, &core_module, val). As these are called rather often,

this may actually have some (small) measurable effect.

  1. … 42 more files in changeset.
disable hook probes for our two hooks which have no args

Reviewed by: jim

  1. … 1 more file in changeset.
Add child_status hook for tracking creation/termination of MPM child

processes. Add end_generation hook for notification when the last

MPM child of a generation exits.

end_generation is implemented completely by core using the

child_status hook run by the MPM.

simple and mpmt_os2 MPMs don't currently run the child_status

hook, so neither hook is invoked with those MPMs.

  1. … 11 more files in changeset.
Abort if the MPM is changed across restart.

A new MPM can't be expected to manage the existing state,

particularly if that includes processes from the previous


  1. … 1 more file in changeset.
Simplify the interface to ap_reclaim_child_processes() and

ap_relieve_child_processes(): instead of requiring the MPM

to implement an otherwise-useless hook, just use a callback


As I don't expect third-party MPM devs are following our day

to day progress, the API changes are considered part of

yesterday's MMN change.

  1. … 7 more files in changeset.
the mpm-note-child-killed hook was just for use by

ap_{reclaim,relieve}_child_processes; those functions can

invoke the hook directly; the function ap_mpm_note_child_killed()

is useless

  1. … 3 more files in changeset.
mpm_common.c implements a handful of config directives; the

related state has to be re-initialized to the default values

at pre-config time, but that was handled inconsistently by

the MPMs, resulting in unexpected behavior when some of the

directives were removed across restart

move that necessary initialization from the MPMs to common

code run from core's pre-config; MPMs that need to override

defaults can do so by running after core's pre-config (the

NetWare MPM now does that)

the DEFAULT_MAX_REQUESTS_PER_CHILD compile setting wasn't useful

enough to keep

the simple MPM wasn't consistent in which of these directives

were respected and which weren't, and that hasn't changed

(see procmgr.max_requests_per_child vs. ap_max_requests_per_child)

  1. … 15 more files in changeset.
use apr_time_from_sec() shortcut

Added prototype for initgroups().

  1. … 1 more file in changeset.
Rename MaxRequestsPerChild to MaxConnectionsPerChild, which

describes more accurately what the directive does.

The old name still works but logs a warning.

  1. … 20 more files in changeset.
core: Abort with sensible error message if no or more than one MPM is


  1. … 4 more files in changeset.
remove more unused variables

revove some obsolete comments

netware file is untested

  1. … 12 more files in changeset.